Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  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. 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)
  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. api/go1.21.txt

    pkg regexp, method (*Regexp) UnmarshalText([]uint8) error #46159
    pkg runtime, method (*PanicNilError) Error() string #25448
    pkg runtime, method (*PanicNilError) RuntimeError() #25448
    pkg runtime, method (*Pinner) Pin(interface{}) #46787
    pkg runtime, method (*Pinner) Unpin() #46787
    pkg runtime, type PanicNilError struct #25448
    pkg runtime, type Pinner struct #46787
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Mon Aug 07 09:39:17 GMT 2023
    - 25.6K bytes
    - Viewed (0)
Back to top