- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for addTrustedCertificate (0.36 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
.add(server.hostName, pin(goodIntermediateCa.certificate)) .build() val handshakeCertificates = HandshakeCertificates .Builder() .addTrustedCertificate(rootCa.certificate) .addTrustedCertificate(compromisedRootCa.certificate) .build() val client = clientTestRule .newClientBuilder() .sslSocketFactory(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 24.3K bytes - Viewed (1) -
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 Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 19:32:33 UTC 2025 - 9.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt
val certificates = HandshakeCertificates .Builder() .addTrustedCertificate(letsEncryptCertificateAuthority) .addTrustedCertificate(entrustRootCertificateAuthority) .addTrustedCertificate(comodoRsaCertificationAuthority) // Uncomment if standard certificates are also required. // .addPlatformTrustedCertificates()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 8.8K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt
.build() val server = HandshakeCertificates .Builder() .addTrustedCertificate(clientRoot.certificate) .heldCertificate(serverCertificate, serverIntermediate.certificate) .build() val client = HandshakeCertificates .Builder() .addTrustedCertificate(serverRoot.certificate) .heldCertificate(clientCertificate, clientIntermediate.certificate)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 7.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/OpenJSSETest.kt
.addSubjectAlternativeName("localhost") .build() val handshakeCertificates = HandshakeCertificates .Builder() .heldCertificate(heldCertificate) .addTrustedCertificate(heldCertificate.certificate) .build() client = client .newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(),
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 3.7K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt
.addSubjectAlternativeName("url-host.com") .build() val handshakeCertificates = HandshakeCertificates .Builder() .heldCertificate(heldCertificate) .addTrustedCertificate(heldCertificate.certificate) .build() server.useHttps(handshakeCertificates.sslSocketFactory()) val dns = Dns { Dns.SYSTEM.lookup(server.hostName) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 6.3K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt
.addSubjectAlternativeName("localhost.localdomain") .build() return@lazy HandshakeCertificates .Builder() .heldCertificate(heldCertificate) .addTrustedCertificate(heldCertificate.certificate) .build() } /** Returns an SSL client for this host's localhost address. */ @JvmStatic fun localhost(): HandshakeCertificates = localhost
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.3K bytes - Viewed (1) -
android-test/src/androidTest/java/okhttp/android/test/letsencrypt/LetsEncryptClientTest.kt
val handshakeCertificates = HandshakeCertificates .Builder() // TODO reenable in official answers // .addPlatformTrustedCertificates() .addTrustedCertificate(cert) .build() clientBuilder .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.4K 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt
val heldCertificate: HeldCertificate = HeldCertificate.Builder().build() builder = builder.heldCertificate(heldCertificate, heldCertificate.certificate()) builder = builder.addTrustedCertificate(heldCertificate.certificate()) } @Test @Disabled fun heldCertificate() { val heldCertificate: HeldCertificate = HeldCertificate.Builder().build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 13.3K bytes - Viewed (0)