Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 15 for certificatePinner (0.11 seconds)

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

     *
     * ```java
     * String hostname = "publicobject.com";
     * CertificatePinner certificatePinner = new CertificatePinner.Builder()
     *     .add(hostname, "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=")
     *     .build();
     * OkHttpClient client = OkHttpClient.Builder()
     *     .certificatePinner(certificatePinner)
     *     .build();
     *
     * Request request = new Request.Builder()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 14.2K bytes
    - Click Count (1)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketEffect.ShutdownConnection
    import mockwebserver3.junit5.StartStop
    import okhttp3.CertificatePinner
    import okhttp3.CertificatePinner.Companion.pin
    import okhttp3.OkHttpClientTestRule
    import okhttp3.RecordingHostnameVerifier
    import okhttp3.Request
    import okhttp3.internal.platform.Platform.Companion.get
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 24.4K bytes
    - Click Count (2)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RealInterceptorChain.kt

      }
    
      override fun withCertificatePinner(certificatePinner: CertificatePinner): Interceptor.Chain {
        check(exchange == null) { "certificatePinner can't be adjusted in a network interceptor" }
    
        val newCertificatePinner =
          if (certificateChainCleaner != null) {
            certificatePinner.withCertificateChainCleaner(certificateChainCleaner)
          } else {
            certificatePinner
          }
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 12.8K bytes
    - Click Count (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/InterceptorOverridesTest.kt

        object CertificatePinnerOverride : Override<CertificatePinner> {
          override fun Interceptor.Chain.value(): CertificatePinner = certificatePinner
    
          override fun Interceptor.Chain.withOverride(value: CertificatePinner): Interceptor.Chain = withCertificatePinner(value)
    
          override fun OkHttpClient.Builder.withOverride(value: CertificatePinner): OkHttpClient.Builder = certificatePinner(value)
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 11 02:37:00 GMT 2026
    - 28.8K bytes
    - Click Count (0)
  5. 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
          }
    
        /**
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Feb 03 22:17:59 GMT 2026
    - 51.5K bytes
    - Click Count (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt

        /**
         * Returns the [CertificatePinner] for the OkHttpClient, or an override from the Call.Chain.
         */
        val certificatePinner: CertificatePinner
    
        /**
         * Returns a new chain with the specified [CertificatePinner].
         */
        fun withCertificatePinner(certificatePinner: CertificatePinner): Chain
    
        /**
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  7. 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))
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 49.7K bytes
    - Click Count (0)
  8. 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 {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 72.3K bytes
    - Click Count (0)
  9. 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 {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 72.3K bytes
    - Click Count (0)
  10. android-test/src/androidDeviceTest/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"))
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 29.9K bytes
    - Click Count (0)
Back to Top