- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for addInsecureHost (0.07 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt
server.enqueue(MockResponse()) val clientCertificates = HandshakeCertificates .Builder() .addPlatformTrustedCertificates() .addInsecureHost(server.hostName) .build() val client = clientTestRule .newClientBuilder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 4.2K bytes - Click Count (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
.setHeader("Location", "https://www.google.com/robots.txt"), ) } val clientCertificates = HandshakeCertificates .Builder() .addPlatformTrustedCertificates() .addInsecureHost(server.hostName) .build() val client = OkHttpClient .Builder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager) .build()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 1.9K bytes - Click Count (0) -
android-test/src/androidDeviceTest/java/okhttp/android/test/OkHttpTest.kt
assumeTrue(Build.VERSION.SDK_INT >= 24) val clientCertificates = HandshakeCertificates .Builder() .apply { if (Build.VERSION.SDK_INT >= 24) { addInsecureHost(server.hostName) } }.build() client = client .newBuilder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 29.9K bytes - Click Count (0) -
okhttp-tls/api/okhttp-tls.api
public final fun trustManager ()Ljavax/net/ssl/X509TrustManager; } public final class okhttp3/tls/HandshakeCertificates$Builder { public fun <init> ()V public final fun addInsecureHost (Ljava/lang/String;)Lokhttp3/tls/HandshakeCertificates$Builder; public final fun addPlatformTrustedCertificates ()Lokhttp3/tls/HandshakeCertificates$Builder;
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Feb 26 19:17:33 GMT 2022 - 3.7K bytes - Click Count (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt
* a mechanism to trust some hosts and not others. * * @param hostname the exact hostname from the URL for insecure connections. */ fun addInsecureHost(hostname: String) = apply { insecureHosts += hostname } fun build(): HandshakeCertificates { val immutableInsecureHosts = insecureHosts.toImmutableList()Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat May 10 11:15:14 GMT 2025 - 8.4K bytes - Click Count (0) -
docs/changelogs/changelog_4x.md
## Version 4.7.1 _2020-05-18_ * Fix: Pass the right arguments in the trust manager created for `addInsecureHost()`. Without the fix insecure hosts crash with an `IllegalArgumentException` on Android. ## Version 4.7.0 _2020-05-17_ * New: `HandshakeCertificates.Builder.addInsecureHost()` makes it easy to turn off security inCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K bytes - Click Count (0)