- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for addTrustedCertificate (0.11 sec)
-
okhttp/src/test/java/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( handshakeCertificates.sslSocketFactory(),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.8K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.8K bytes - Viewed (0) -
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 Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 9.1K 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) .build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 7.1K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.9K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.1K bytes - Viewed (0) -
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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/OpenJSSETest.kt
.addSubjectAlternativeName("localhost") .build() val handshakeCertificates = HandshakeCertificates.Builder() .heldCertificate(heldCertificate) .addTrustedCertificate(heldCertificate.certificate) .build() client = client.newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 3.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocketChannelTest.kt
.commonName(hostname) .addSubjectAlternativeName(hostname) .build() HandshakeCertificates.Builder() .heldCertificate(heldCertificate) .addTrustedCertificate(heldCertificate.certificate) .build() } private var acceptedHostName: String? = null private lateinit var server: MockWebServer @BeforeEach fun setUp(server: MockWebServer) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8K bytes - Viewed (0) -
okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt
.addSubjectAlternativeName("localhost") .build() return@lazy HandshakeCertificates.Builder() .addPlatformTrustedCertificates() .heldCertificate(heldCertificate) .addTrustedCertificate(heldCertificate.certificate) .build() } @Before fun init() { assumeTrue("Supported on API 29+", Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) client =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0)