Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 25 for CertificatePinner (0.08 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  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/CertificatePinnerTest.kt

        certificatePinner.check("example.com", listOf(certA1.certificate))
        certificatePinner.check("www.example.com", listOf(certA1.certificate))
      }
    
      @Test
      fun absentHostnameMatches() {
        val certificatePinner = CertificatePinner.Builder().build()
        certificatePinner.check("example.com", listOf(certA1.certificate))
      }
    
      @Test
      fun successfulCheckForWildcardHostname() {
        val certificatePinner =
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 10.1K bytes
    - Click Count (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Address.kt

      @JvmName("-deprecated_certificatePinner")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "certificatePinner"),
        level = DeprecationLevel.ERROR,
      )
      fun certificatePinner(): CertificatePinner? = certificatePinner
    
      override fun equals(other: Any?): Boolean =
        other is Address &&
          url == other.url &&
          equalsNonHost(other)
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 7.3K bytes
    - Click Count (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerKotlinTest.kt

      @Test
      fun successfulCheckSha1Pin() {
        val certificatePinner =
          CertificatePinner
            .Builder()
            .add("example.com", "sha1/" + certA1.certificate.sha1Hash().base64())
            .build()
    
        certificatePinner.check("example.com", listOf(certA1.certificate))
      }
    
      @Test fun successfulFindMatchingPins() {
        val certificatePinner =
          CertificatePinner
            .Builder()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 8.2K bytes
    - Click Count (0)
  5. 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)
  6. 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)
  7. 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)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/CertificatePinning.kt

     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.IOException
    import okhttp3.CertificatePinner
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class CertificatePinning {
      private val client =
        OkHttpClient
          .Builder()
          .certificatePinner(
            CertificatePinner
              .Builder()
              .add("publicobject.com", "sha256/Vjs8r4z+80wjNcr1YKepWQboSIRi63WsWXhIMN+eWys=")
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 1.4K bytes
    - Click Count (0)
  9. 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)
  10. samples/guide/src/main/java/okhttp3/recipes/CertificatePinning.java

    import java.io.IOException;
    import java.security.cert.Certificate;
    import okhttp3.CertificatePinner;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    
    public final class CertificatePinning {
      private final OkHttpClient client = new OkHttpClient.Builder()
          .certificatePinner(
              new CertificatePinner.Builder()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Dec 08 21:30:01 GMT 2019
    - 1.7K bytes
    - Click Count (0)
Back to Top