Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 26 for certificatePinner (0.22 sec)

  1. okhttp/src/test/java/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))
    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)
  2. docs/features/https.md

              for (certificate in response.handshake!!.peerCertificates) {
                println(CertificatePinner.pin(certificate))
              }
            }
          }
        ```
    === ":material-language-java: Java"
        ```java
          private final OkHttpClient client = new OkHttpClient.Builder()
              .certificatePinner(
                  new CertificatePinner.Builder()
    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)
  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"))
    
    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)
  4. samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java

     * limitations under the License.
     */
    package okhttp3.recipes;
    
    import java.io.IOException;
    import java.security.cert.Certificate;
    import java.util.Collections;
    import java.util.Set;
    import okhttp3.CertificatePinner;
    import okhttp3.Interceptor;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    
    public final class CheckHandshake {
      /** Rejects otherwise-trusted certificates. */
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

        }
      }
    
      @Test fun certificatePinnerEquality() {
        val clientA = clientTestRule.newClient()
        val clientB = clientTestRule.newClient()
        assertThat(clientB.certificatePinner).isEqualTo(clientA.certificatePinner)
      }
    
      @Test fun nullInterceptorInList() {
        val builder = OkHttpClient.Builder()
        builder.interceptors().addAll(listOf(null) as List<Interceptor>)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              )
            }
          }
    
          val certificatePinner = address.certificatePinner!!
    
          val handshake =
            Handshake(
              unverifiedHandshake.tlsVersion,
              unverifiedHandshake.cipherSuite,
              unverifiedHandshake.localCertificates,
            ) {
              certificatePinner.certificateChainCleaner!!.clean(
                unverifiedHandshake.peerCertificates,
    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/api/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 {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

        return 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,
        )
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

    import javax.net.ssl.SSLContext
    import javax.net.ssl.SSLSocketFactory
    import javax.net.ssl.TrustManager
    import javax.net.ssl.X509KeyManager
    import javax.net.ssl.X509TrustManager
    import okhttp3.CertificatePinner
    import okhttp3.internal.platform.Platform
    import okhttp3.internal.toImmutableList
    import okhttp3.tls.internal.TlsUtil.newKeyManager
    import okhttp3.tls.internal.TlsUtil.newTrustManager
    
    /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.5K bytes
    - Viewed (1)
  10. docs/changelogs/upgrading_to_okhttp_4.md

    #### Vars and Vals
    
    Java doesn’t have language support for properties so developers make do with getters and setters.
    Kotlin does have properties and we take advantage of them in OkHttp.
    
     * **Address**: certificatePinner, connectionSpecs, dns, hostnameVerifier, protocols, proxy,
       proxyAuthenticator, proxySelector, socketFactory, sslSocketFactory, url
     * **Cache**: directory
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:58:16 GMT 2022
    - 10.9K bytes
    - Viewed (0)
Back to top