Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for pin (0.12 sec)

  1. okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt

          when {
            pin.startsWith("sha1/") -> {
              this.hashAlgorithm = "sha1"
              this.hash = pin.substring("sha1/".length).decodeBase64() ?: throw IllegalArgumentException("Invalid pin hash: $pin")
            }
            pin.startsWith("sha256/") -> {
              this.hashAlgorithm = "sha256"
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.2K bytes
    - Viewed (1)
  2. okhttp/src/test/java/okhttp3/CertificatePinnerTest.kt

        Assertions.assertTrue(pin.matchesCertificate(certA1.certificate))
        Assertions.assertFalse(pin.matchesCertificate(certB1.certificate))
      }
    
      @Test
      fun testMatchesSha1() {
        val pin = CertificatePinner.Pin("example.com", certC1Sha1Pin)
        Assertions.assertTrue(pin.matchesCertificate(certC1.certificate))
        Assertions.assertFalse(pin.matchesCertificate(certB1.certificate))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  3. docs/features/https.md

              if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
              for (certificate in response.handshake!!.peerCertificates) {
                println(CertificatePinner.pin(certificate))
              }
            }
          }
        ```
    === ":material-language-java: Java"
        ```java
          private final OkHttpClient client = new OkHttpClient.Builder()
              .certificatePinner(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Dec 24 00:16:30 GMT 2022
    - 10.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              val cert = peerCertificates[0] as X509Certificate
              throw SSLPeerUnverifiedException(
                """
                |Hostname ${address.url.host} not verified:
                |    certificate: ${CertificatePinner.pin(cert)}
                |    DN: ${cert.subjectDN.name}
                |    subjectAltNames: ${OkHostnameVerifier.allSubjectAltNames(cert)}
                """.trimMargin(),
              )
            } else {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

    import kotlin.test.assertFailsWith
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.DisconnectAtEnd
    import okhttp3.CertificatePinner
    import okhttp3.CertificatePinner.Companion.pin
    import okhttp3.OkHttpClientTestRule
    import okhttp3.RecordingHostnameVerifier
    import okhttp3.Request
    import okhttp3.internal.platform.Platform.Companion.get
    import okhttp3.testing.PlatformRule
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.8K bytes
    - Viewed (0)
  6. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

      @Test
      fun testCertificatePinningSuccess() {
        enableTls()
    
        val certificatePinner =
          CertificatePinner.Builder()
            .add(
              server.hostName,
              CertificatePinner.pin(handshakeCertificates.trustManager.acceptedIssuers[0]),
            )
            .build()
        client = client.newBuilder().certificatePinner(certificatePinner).build()
    
        server.enqueue(MockResponse(body = "abc"))
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  7. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val certificates: List<Certificate> = listOf()
        certificatePinner.check("", listOf(certificate))
        certificatePinner.check("", arrayOf<Certificate>(certificate, certificate).toList())
        val pin: String = CertificatePinner.pin(certificate)
        val default: CertificatePinner = CertificatePinner.DEFAULT
      }
    
      @Test
      fun certificatePinnerBuilder() {
        val builder: CertificatePinner.Builder = CertificatePinner.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  8. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

    import javax.net.ssl.SSLSession
    import javax.net.ssl.X509TrustManager
    import kotlin.test.assertFailsWith
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import okhttp3.CertificatePinner.Companion.pin
    import okhttp3.testing.PlatformRule
    import okhttp3.tls.HandshakeCertificates
    import okhttp3.tls.HeldCertificate
    import org.junit.jupiter.api.BeforeEach
    import org.junit.jupiter.api.Tag
    import org.junit.jupiter.api.Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  9. docs/changelogs/changelog_2x.md

        ```
    
     * **`CertificatePinner` now supports wildcard hostnames.** As always with
       certificate pinning, you must be very careful to avoid [bricking][brick]
       your app. You'll need to pin both the top-level domain and the `*.` domain
       for full coverage.
    
        ```java
         client.setCertificatePinner(new CertificatePinner.Builder()
             .add("publicobject.com",   "sha1/DmxUShsZuNiqPQsX2Oi9uv2sCnw=")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Viewed (0)
  10. okhttp/src/main/resources/okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz

    philately.museum philips phoenix.museum phone photo photography photography.museum photos phx.enscaled.us physio pi.gov.br pi.it pi.leg.br piacenza.it pics pictet pictures pid piedmont.it piemonte.it pigboat.jp pila.pl pilot.aero pilots.museum pimienta.org pin pinb.gov.pl ping pink pinoko.jp pioneer pippu.hokkaido.jp pisa.it pistoia.it pisz.pl pittsburgh.museum piw.gov.pl pixolino.com pizza pk pl pl.eu.org pl.ua place planetarium.museum plantation.museum plants.museum platform0.app platter-app.com platter-app.dev...
    Others
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 40.4K bytes
    - Viewed (0)
Back to top