- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 67 for TrustManager (0.05 sec)
-
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt
"Unexpected trust managers: ${result.contentToString()}" } val trustManager = result[0] as X509TrustManager return when { insecureHosts.isEmpty() -> trustManager Platform.isAndroid -> InsecureAndroidTrustManager(trustManager, insecureHosts) else -> InsecureExtendedTrustManager(trustManager as X509ExtendedTrustManager, insecureHosts) } } /**
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.3K bytes - Viewed (1) -
okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt
Conscrypt.getApplicationProtocol(sslSocket) } else { super.getSelectedProtocol(sslSocket) } override fun newSslSocketFactory(trustManager: X509TrustManager): SSLSocketFactory = newSSLContext() .apply { init(null, arrayOf<TrustManager>(trustManager), null) }.socketFactory companion object { val isSupported: Boolean = try {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.6K bytes - Viewed (0) -
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) -
samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt
val trustManager = Platform.get().platformTrustManager() val sslContext = SSLContext.getInstance("TLS") sslContext.init(arrayOf(keyManager), arrayOf(trustManager), SecureRandom()) val client = OkHttpClient .Builder() .sslSocketFactory(sslContext.socketFactory, trustManager) .build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 10 11:15:14 UTC 2025 - 4.2K bytes - Viewed (0) -
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) -
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) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/tls/CertificateChainCleaner.kt
abstract fun clean( chain: List<Certificate>, hostname: String, ): List<Certificate> companion object { fun get(trustManager: X509TrustManager): CertificateChainCleaner = Platform.get().buildCertificateChainCleaner(trustManager) fun get(vararg caCerts: X509Certificate): CertificateChainCleaner = BasicCertificateChainCleaner(BasicTrustRootIndex(*caCerts)) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2K bytes - Viewed (0) -
android-test/src/test/kotlin/okhttp/android/test/AndroidSocketAdapterTest.kt
assertTrue(adapter.matchesSocketFactory(context.socketFactory)) assertNotNull(adapter.trustManager(context.socketFactory)) } @Test fun testDoesntMatchSupportedCustomSocketFactory() { assumeFalse(adapter is StandardAndroidSocketAdapter) assertFalse(adapter.matchesSocketFactory(context.socketFactory)) assertNull(adapter.trustManager(context.socketFactory)) } @Test fun testCustomSocket() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.6K bytes - Viewed (0) -
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) -
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)