- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for addTrustedCertificate (0.06 sec)
-
okhttp-tls/README.md
to trust. In this simplified example we trust the server's self-signed certificate: ```java HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() .addTrustedCertificate(localhostCertificate.certificate()) .build(); OkHttpClient client = new OkHttpClient.Builder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) .build(); ```
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Thu Oct 30 21:39:59 UTC 2025 - 9.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/SocketChannelTest.kt
.commonName(hostname) .addSubjectAlternativeName(hostname) .build() HandshakeCertificates .Builder() .heldCertificate(heldCertificate) .addTrustedCertificate(heldCertificate.certificate) .build() } private var acceptedHostName: String? = null @StartStop private val server = MockWebServer() @BeforeEach fun setUp() {
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sat Nov 01 12:18:11 UTC 2025 - 7.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt
private fun buildClient( heldCertificate: HeldCertificate?, vararg intermediates: X509Certificate, ): OkHttpClient { val builder = HandshakeCertificates .Builder() .addTrustedCertificate(serverRootCa.certificate) if (heldCertificate != null) { builder.heldCertificate(heldCertificate, *intermediates) } val handshakeCertificates = builder.build() return clientTestRule
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 13K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
val heldCertificate = HeldCertificate.Builder().build() builder = builder.heldCertificate(heldCertificate, heldCertificate.certificate) builder = builder.addTrustedCertificate(heldCertificate.certificate) builder = builder.addPlatformTrustedCertificates() val handshakeCertificates: HandshakeCertificates = builder.build() } @Test fun heldCertificate() {
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 47K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
HandshakeCertificates .Builder() .heldCertificate(serverCertificate) .build() val clientCertificates = HandshakeCertificates .Builder() .addTrustedCertificate(serverCertificate.certificate) .build() client = client .newBuilder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 147.4K bytes - Viewed (0)