- Sort Score
- Num 10 results
- Language All
Results 1 - 5 of 5 for addTrustedCertificate (0.25 seconds)
-
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(); ```
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Thu Oct 30 21:39:59 GMT 2025 - 9.1K bytes - Click Count (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() {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Nov 01 12:18:11 GMT 2025 - 7.9K bytes - Click Count (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
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 13K bytes - Click Count (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() {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Nov 05 18:28:35 GMT 2025 - 47K bytes - Click Count (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)Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 147.4K bytes - Click Count (0)