- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for addPlatformTrustedCertificates (0.26 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/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) -
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) -
okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt
.isEqualTo(listOf(certificate.certificate, intermediate.certificate)) } @Test fun platformTrustedCertificates() { val handshakeCertificates = HandshakeCertificates.Builder() .addPlatformTrustedCertificates() .build() val acceptedIssuers = handshakeCertificates.trustManager.acceptedIssuers val names = acceptedIssuers .map { it.subjectDN.name } .toSet()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 7.1K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt
* certificates. Applications that connect to a known set of servers may be able to mitigate * this problem with [certificate pinning][CertificatePinner]. */ fun addPlatformTrustedCertificates() = apply { val platformTrustManager = Platform.get().platformTrustManager() Collections.addAll(trustedCertificates, *platformTrustManager.acceptedIssuers) } /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.5K bytes - Viewed (0) -
docs/changelogs/changelog_4x.md
[our DevServer sample][dev_server]: ```kotlin val clientCertificates = HandshakeCertificates.Builder() .addPlatformTrustedCertificates() .addInsecureHost("localhost") .build() val client = OkHttpClient.Builder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 17 13:25:31 UTC 2024 - 25.2K bytes - Viewed (0)