Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for certificatePinner (0.13 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt

         * Pinning certificates avoids the need to trust certificate authorities.
         */
        fun certificatePinner(certificatePinner: CertificatePinner) =
          apply {
            if (certificatePinner != this.certificatePinner) {
              this.routeDatabase = null
            }
    
            this.certificatePinner = certificatePinner
          }
    
        /**
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:55:03 UTC 2025
    - 51.4K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

            ) = TODO()
          }
      }
    
      @Test
      fun certificatePinner() {
        val heldCertificate: HeldCertificate = HeldCertificate.Builder().build()
        val certificate: X509Certificate = heldCertificate.certificate
        val certificatePinner: CertificatePinner = CertificatePinner.Builder().build()
        val certificates: List<Certificate> = listOf()
        certificatePinner.check("", listOf(certificate))
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 47K bytes
    - Viewed (0)
  3. 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"))
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 29.9K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              )
            }
          }
    
          val certificatePinner = address.certificatePinner!!
    
          val handshake =
            Handshake(
              unverifiedHandshake.tlsVersion,
              unverifiedHandshake.cipherSuite,
              unverifiedHandshake.localCertificates,
            ) {
              certificatePinner.certificateChainCleaner!!.clean(
                unverifiedHandshake.peerCertificates,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 19.3K bytes
    - Viewed (2)
  5. okhttp/api/jvm/okhttp.api

    }
    
    public final class okhttp3/CertificatePinner$Builder {
    	public fun <init> ()V
    	public final fun add (Ljava/lang/String;[Ljava/lang/String;)Lokhttp3/CertificatePinner$Builder;
    	public final fun build ()Lokhttp3/CertificatePinner;
    	public final fun getPins ()Ljava/util/List;
    }
    
    public final class okhttp3/CertificatePinner$Companion {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.2K bytes
    - Viewed (0)
  6. okhttp/api/android/okhttp.api

    }
    
    public final class okhttp3/CertificatePinner$Builder {
    	public fun <init> ()V
    	public final fun add (Ljava/lang/String;[Ljava/lang/String;)Lokhttp3/CertificatePinner$Builder;
    	public final fun build ()Lokhttp3/CertificatePinner;
    	public final fun getPins ()Ljava/util/List;
    }
    
    public final class okhttp3/CertificatePinner$Companion {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.3K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

        Address(
          uriHost = uriHost,
          uriPort = uriPort,
          dns = dns,
          socketFactory = SocketFactory.getDefault(),
          sslSocketFactory = null,
          hostnameVerifier = null,
          certificatePinner = null,
          proxyAuthenticator = proxyAuthenticator,
          proxy = proxy,
          protocols = protocols,
          connectionSpecs = connectionSpecs,
          proxySelector = proxySelector,
        )
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnection.kt

        if (address.hostnameVerifier !== OkHostnameVerifier) return false
        if (!supportsUrl(address.url)) return false
    
        // 4. Certificate pinning must match the host.
        try {
          address.certificatePinner!!.check(address.url.host, handshake()!!.peerCertificates)
        } catch (_: SSLPeerUnverifiedException) {
          return false
        }
    
        return true // The caller's address can be carried by this connection.
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:55:03 UTC 2025
    - 14.6K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

        enableTls()
        server.enqueue(MockResponse())
    
        // Pin publicobject.com's cert.
        client =
          client
            .newBuilder()
            .certificatePinner(
              CertificatePinner
                .Builder()
                .add(server.hostName, "sha1/DmxUShsZuNiqPQsX2Oi9uv2sCnw=")
                .build(),
            ).build()
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 147.4K bytes
    - Viewed (0)
Back to top