Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for TrustManager (1.7 sec)

  1. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/Android10Platform.kt

        NetworkSecurityPolicy.getInstance().isCleartextTrafficPermitted(hostname)
    
      override fun buildCertificateChainCleaner(trustManager: X509TrustManager): CertificateChainCleaner =
        AndroidCertificateChainCleaner.buildIfSupported(trustManager) ?: super.buildCertificateChainCleaner(trustManager)
    
      override fun log(
        message: String,
        level: Int,
        t: Throwable?,
      ) {
        if (level == WARN) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Jul 20 11:25:50 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  2. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        val sslContext =
          Platform.get().newSSLContext().apply {
            init(null, arrayOf(trustManager), null)
          }
        val sslSocketFactory = sslContext.socketFactory
    
        val hostnameVerifier = HostnameVerifier { _, _ -> true }
    
        client =
          client
            .newBuilder()
            .sslSocketFactory(sslSocketFactory, trustManager)
            .hostnameVerifier(hostnameVerifier)
            .build()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 14:12:28 UTC 2025
    - 29K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Platform.kt

      }
    
      open fun buildCertificateChainCleaner(trustManager: X509TrustManager): CertificateChainCleaner =
        BasicCertificateChainCleaner(buildTrustRootIndex(trustManager))
    
      open fun buildTrustRootIndex(trustManager: X509TrustManager): TrustRootIndex = BasicTrustRootIndex(*trustManager.acceptedIssuers)
    
      open fun newSslSocketFactory(trustManager: X509TrustManager): SSLSocketFactory {
        try {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

        val x509KeyManager = newKeyManager(keystoreType, heldCertificate, *intermediates)
        val trustManager =
          newTrustManager(
            keystoreType,
            emptyList(),
            emptyList(),
          )
        val sslContext = get().newSSLContext()
        sslContext.init(
          arrayOf<KeyManager>(x509KeyManager),
          arrayOf<TrustManager>(trustManager),
          SecureRandom(),
        )
        return sslContext.socketFactory
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 24.3K bytes
    - Viewed (1)
  5. okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt

            .addInsecureHost(server.hostName)
            .build()
    
        val client =
          clientTestRule
            .newClientBuilder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
            .build()
    
        val call = client.newCall(Request(server.url("/")))
        val response = call.execute()
        assertThat(response.code).isEqualTo(200)
        assertThat(response.handshake!!.cipherSuite).isNotNull()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  6. okhttp-tls/README.md

        .addTrustedCertificate(localhostCertificate.certificate())
        .build();
    OkHttpClient client = new OkHttpClient.Builder()
        .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
        .build();
    ```
    
    With a server that holds a certificate and a client that trusts it we have enough for an HTTPS
    handshake. The best part of this example is that we don't need to make our test code insecure with a
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 19:32:33 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  7. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

          }
    
        val client =
          clientTestRule
            .newClientBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            ).dns(dns)
            .build()
    
        server.enqueue(MockResponse())
    
        val url =
          server
            .url("/")
            .newBuilder()
            .host("localhost.localdomain")
            .build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt

            )
          val trustManager =
            newTrustManager(
              null,
              Arrays.asList(serverRootCa.certificate, clientRootCa.certificate),
              emptyList(),
            )
          val sslContext = SSLContext.getInstance("TLS")
          sslContext.init(
            arrayOf<KeyManager>(keyManager),
            arrayOf<TrustManager>(trustManager),
            SecureRandom(),
          )
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt

            override fun connectFailed(
              uri: URI,
              socketAddress: SocketAddress,
              e: IOException,
            ) {}
          }
    
        val trustManager = get().platformTrustManager()
        val sslContext = get().newSSLContext()
        sslContext.init(null, null, null)
    
        // new client, may share all same fields but likely different connection pool
        assertNotSame(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 13.4K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

        val trustManager = RecordingTrustManager(handshakeCertificates.trustManager)
        val sslContext = get().newSSLContext()
        sslContext.init(null, arrayOf<TrustManager>(trustManager), null)
        client =
          client
            .newBuilder()
            .hostnameVerifier(hostnameVerifier)
            .sslSocketFactory(sslContext.socketFactory, trustManager)
            .build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
Back to top