- Sort Score
- Num 10 results
- Language All
Results 1 - 5 of 5 for trustManagers (0.16 seconds)
-
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() }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:01:42 GMT 2026 - 10.5K bytes - Click Count (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
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:01:42 GMT 2026 - 9.1K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
ConnectionSpec.RESTRICTED_TLS, ConnectionSpec.MODERN_TLS, ), ).sslSocketFactory( suppressTlsFallbackClientSocketFactory(), handshakeCertificates.trustManager, ).build() executeSynchronously("/").assertBody("abc") } @Test fun recoverFromTlsHandshakeFailure_tlsFallbackScsvEnabled() { platform.assumeNotConscrypt()Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:02:18 GMT 2026 - 146.5K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorOverridesTest.kt
enableTls() overrideBadImplementation( override = Override.X509TrustManagerOverride, testItFails = testItFails, goodValue = handshakeCertificates.trustManager, ) } OverrideParam.HostnameVerifier -> { enableTls() overrideBadImplementation(override = override.override, testItFails = testItFails) }
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) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
.body("ABC") .build(), ) client = client .newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ).hostnameVerifier(NULL_HOSTNAME_VERIFIER) .build() val request = Request.Builder().url(server.url("/")).build() val response1 = client.newCall(request).execute()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Mar 20 09:13:37 GMT 2026 - 121K bytes - Click Count (0)