- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for addPlatformTrustedCertificates (0.2 sec)
-
okhttp/src/test/java/okhttp3/InsecureForHostTest.kt
server.useHttps(serverCertificates.sslSocketFactory()) server.enqueue(MockResponse()) val clientCertificates = HandshakeCertificates.Builder() .addPlatformTrustedCertificates() .addInsecureHost(server.hostName) .build() val client = clientTestRule.newClientBuilder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
.setResponseCode(HTTP_MOVED_TEMP) .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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
okhttp-tls/api/okhttp-tls.api
} 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; public final fun addTrustedCertificate (Ljava/security/cert/X509Certificate;)Lokhttp3/tls/HandshakeCertificates$Builder;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Feb 26 19:17:33 UTC 2022 - 3.7K bytes - Viewed (0) -
okhttp-tls/README.md
This is the behavior you'll get with your OkHttpClient if you don't specifically configure `HandshakeCertificates`. Or you can do it explicitly with `addPlatformTrustedCertificates()`: ```java HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() .addPlatformTrustedCertificates() .build(); OkHttpClient client = new OkHttpClient.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 9.1K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
assumeNetwork() val request = Request.Builder().url("https://api.twitter.com/robots.txt").build() val clientCertificates = HandshakeCertificates.Builder() .addPlatformTrustedCertificates() .apply { if (Build.VERSION.SDK_INT >= 24) { addInsecureHost(server.hostName) } } .build() 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) -
android-test/src/androidTest/java/okhttp/android/test/letsencrypt/LetsEncryptClientTest.kt
""".trimIndent().decodeCertificatePem() val handshakeCertificates = HandshakeCertificates.Builder() // TODO reenable in official answers // .addPlatformTrustedCertificates() .addTrustedCertificate(cert) .build() clientBuilder .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.4K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java
// Uncomment to allow connection to any site generally, but will cause // noticeable memory pressure in Android apps. // .addPlatformTrustedCertificates() .build(); builder.sslSocketFactory(certificates.sslSocketFactory(), certificates.trustManager()); } OkHttpClient client = builder.build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Nov 17 07:40:31 UTC 2020 - 6.1K bytes - Viewed (0) -
okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt
val heldCertificate = HeldCertificate.Builder() .addSubjectAlternativeName("localhost") .build() return@lazy HandshakeCertificates.Builder() .addPlatformTrustedCertificates() .heldCertificate(heldCertificate) .addTrustedCertificate(heldCertificate.certificate) .build() } @Before fun init() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt
.addTrustedCertificate(entrustRootCertificateAuthority) .addTrustedCertificate(comodoRsaCertificationAuthority) // Uncomment if standard certificates are also required. // .addPlatformTrustedCertificates() .build() client = OkHttpClient.Builder() .sslSocketFactory(certificates.sslSocketFactory(), certificates.trustManager) .build() } fun run() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java
.addTrustedCertificate(entrustRootCertificateAuthority) .addTrustedCertificate(comodoRsaCertificationAuthority) // Uncomment if standard certificates are also required. //.addPlatformTrustedCertificates() .build(); client = new OkHttpClient.Builder() .sslSocketFactory(certificates.sslSocketFactory(), certificates.trustManager()) .build(); }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 9.3K bytes - Viewed (0)