- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for sslContext (0.2 sec)
-
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() // An example test URL that returns client certificate details.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/OpenJSSEPlatform.kt
// and because it's a common pattern for VMs to have differences between supported and // defaulted versions for TLS based on what is requested. override fun newSSLContext(): SSLContext = SSLContext.getInstance("TLSv1.3", provider) override fun platformTrustManager(): X509TrustManager { val factory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm(),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.6K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt
level = DeprecationLevel.ERROR, ) fun trustManager(): X509TrustManager = trustManager fun sslSocketFactory(): SSLSocketFactory = sslContext().socketFactory fun sslContext(): SSLContext { return Platform.get().newSSLContext().apply { init(arrayOf<KeyManager>(keyManager), arrayOf<TrustManager>(trustManager), SecureRandom()) } } class Builder {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt
* * Supported on Android 6.0+ via `NetworkSecurityPolicy`. */ open class Platform { /** Prefix used on custom headers. */ fun getPrefix() = "OkHttp" open fun newSSLContext(): SSLContext = SSLContext.getInstance("TLS") open fun platformTrustManager(): X509TrustManager { val factory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm(), )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.8K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/CurlHelper.java
trustManagerFactory.init(keyStore); final SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, trustManagerFactory.getTrustManagers(), null); sslSocketFactory = sslContext.getSocketFactory(); } catch (final Exception e) { logger.warn("Failed to load {}", authorities, e);
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 4.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk9Platform.kt
"clientBuilder.sslSocketFactory(SSLSocketFactory) not supported on JDK 8 (>= 252) or JDK 9+", ) } override fun newSSLContext(): SSLContext { return when { majorVersion != null && majorVersion >= 9 -> SSLContext.getInstance("TLS") else -> try { // Based on SSLSocket.getApplicationProtocol check we should // have TLSv1.3 if we request it.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.5K bytes - Viewed (1) -
docs/features/https.md
try { trustManager = trustManagerForCertificates(trustedCertificatesInputStream()); SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, new TrustManager[] { trustManager }, null); sslSocketFactory = sslContext.getSocketFactory(); } catch (GeneralSecurityException e) { throw new RuntimeException(e); }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Dec 24 00:16:30 UTC 2022 - 10.5K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
) {} override fun getAcceptedIssuers(): Array<X509Certificate> = arrayOf() } val sslContext = Platform.get().newSSLContext().apply { init(null, arrayOf(trustManager), null) } val sslSocketFactory = sslContext.socketFactory val hostnameVerifier = HostnameVerifier { _, _ -> true } client = client.newBuilder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 27K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
} @Test fun testUrlConnectionSecureDirect() { val keyStoreFactory = KeyStoreFactory(Configuration.configuration(), MockServerLogger()) HttpsURLConnection.setDefaultSSLSocketFactory(keyStoreFactory.sslContext().socketFactory) testRequest { val url = URI(mockServer.secureEndpoint + "/person?name=peter").toURL() val connection = url.openConnection() as HttpURLConnection
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 5.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SessionReuseTest.kt
val spec = ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) .tlsVersions(tlsVersion) .build() var reuseSession = false val sslContext = handshakeCertificates.sslContext() val systemSslSocketFactory = sslContext.socketFactory val sslSocketFactory = object : DelegatingSSLSocketFactory(systemSslSocketFactory) { override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 6K bytes - Viewed (0)