Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for trustManagers (0.05 sec)

  1. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

          Security.insertProviderAt(BouncyCastleJsseProvider(), 2)
    
          var socketClass: String? = null
    
          val trustManager =
            TrustManagerFactory
              .getInstance(TrustManagerFactory.getDefaultAlgorithm())
              .apply {
                init(null as KeyStore?)
              }.trustManagers
              .first() as X509TrustManager
    
          val sslContext =
            Platform.get().newSSLContext().apply {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 14:12:28 UTC 2025
    - 29K bytes
    - Viewed (0)
  2. docs/features/https.md

          init {
            val trustManager = trustManagerForCertificates(trustedCertificatesInputStream())
            val sslContext = SSLContext.getInstance("TLS")
            sslContext.init(null, arrayOf<TrustManager>(trustManager), null)
            val sslSocketFactory = sslContext.socketFactory
    
            client = OkHttpClient.Builder()
                .sslSocketFactory(sslSocketFactory, trustManager)
                .build()
          }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Dec 24 00:16:30 UTC 2022
    - 10.5K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

      fun handshakeCertificates() {
        val handshakeCertificates = HandshakeCertificates.Builder().build()
        val keyManager: X509KeyManager = handshakeCertificates.keyManager()
        val trustManager: X509TrustManager = handshakeCertificates.trustManager()
      }
    
      @Test @Disabled
      fun handshakeCertificatesBuilder() {
        var builder: HandshakeCertificates.Builder = HandshakeCertificates.Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt

            .newClientBuilder()
            .fastFallback(false) // Avoid data races.
            .dns(dns)
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            ).build()
        val serverHandshakeCertificates =
          HandshakeCertificates
            .Builder()
            .heldCertificate(certificate)
            .build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jun 19 11:44:16 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionReuseTest.kt

        val anotherClient =
          client
            .newBuilder()
            .sslSocketFactory(
              handshakeCertificates2.sslSocketFactory(),
              handshakeCertificates2.trustManager,
            ).build()
    
        // This client fails to connect because the new SSL socket factory refuses.
        assertFailsWith<IOException> {
          anotherClient.newCall(request).execute()
        }.also { expected ->
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 12.2K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

      @Test
      fun handshakeCertificates() {
        val handshakeCertificates = HandshakeCertificates.Builder().build()
        val keyManager: X509KeyManager = handshakeCertificates.keyManager
        val trustManager: X509TrustManager = handshakeCertificates.trustManager
        val sslSocketFactory: SSLSocketFactory = handshakeCertificates.sslSocketFactory()
        val sslContext: SSLContext = handshakeCertificates.sslContext()
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  10. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

    import java.util.logging.Level
    import java.util.logging.Logger
    import javax.net.ServerSocketFactory
    import javax.net.ssl.SSLContext
    import javax.net.ssl.SSLSocket
    import javax.net.ssl.SSLSocketFactory
    import javax.net.ssl.TrustManager
    import javax.net.ssl.X509TrustManager
    import mockwebserver3.SocketEffect.CloseSocket
    import mockwebserver3.SocketEffect.CloseStream
    import mockwebserver3.SocketEffect.ShutdownConnection
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
Back to top