- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 32 for peerCertificates (0.11 sec)
-
samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java
"sha256/afwiKY3RxoMmLkuRW1l7QsPZTJPwDS2pdDROQjXw8ig="); @Override public Response intercept(Chain chain) throws IOException { for (Certificate certificate : chain.connection().handshake().peerCertificates()) { String pin = CertificatePinner.pin(certificate); if (denylist.contains(pin)) { throw new IOException("Denylisted peer certificate: " + pin); } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Apr 15 14:55:09 UTC 2024 - 2.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt
} throw IOException("Unexpected code $response") } println(response.body.string()) for (peerCertificate in response.handshake?.peerCertificates.orEmpty()) { println((peerCertificate as X509Certificate).subjectDN) } } } } fun main() { CustomTrust().run()
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/src/jvmTest/kotlin/okhttp3/RecordedResponse.kt
assertThat(handshake.tlsVersion).isNotNull() assertThat(handshake.cipherSuite).isNotNull() assertThat(handshake.peerPrincipal).isNotNull() assertThat(handshake.peerCertificates.size).isEqualTo(1) assertThat(handshake.localPrincipal).isNull() assertThat(handshake.localCertificates.size).isEqualTo(0) } /**
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 5.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt
val response = client.newCall(request).execute() response.use { assertEquals(200, response.code) assertEquals( "CN=localhost", (response.handshake!!.peerCertificates.single() as X509Certificate).subjectDN.name, ) } } private fun enableTls() { client = client .newBuilder() .sslSocketFactory(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 8.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnection.kt
} private fun certificateSupportHost( url: HttpUrl, handshake: Handshake, ): Boolean { val peerCertificates = handshake.peerCertificates return peerCertificates.isNotEmpty() && OkHostnameVerifier.verify(url.host, peerCertificates[0] as X509Certificate) } @Throws(SocketException::class) internal fun newCodec( client: OkHttpClient,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 14.9K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 7.6K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt
.assertLogMatch(Regex("""secureConnectStart""")) .assertLogMatch( Regex( """secureConnectEnd: Handshake\{tlsVersion=TLS_1_[23] cipherSuite=TLS_.* peerCertificates=\[CN=localhost] localCertificates=\[]\}""", ), ).assertLogMatch(Regex("""connectEnd: h2""")) .assertLogMatch(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 10.2K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
* **Cookie**: domain, expiresAt, hostOnly, httpOnly, name, path, persistent, value * **Dispatcher**: executorService * **FormBody**: size * **Handshake**: cipherSuite, localCertificates, localPrincipal, peerCertificates, peerPrincipal, tlsVersion * **HandshakeCertificates**: keyManager, trustManager * **Headers**: size * **HeldCertificate**: certificate, keyPair * **HttpLoggingInterceptor**: level
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 16:58:16 UTC 2022 - 10.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CertificatePinning.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CertificatePinning.java
try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); for (Certificate certificate : response.handshake().peerCertificates()) { System.out.println(CertificatePinner.pin(certificate)); } } } public static void main(String... args) throws Exception { new CertificatePinning().run(); }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Dec 08 21:30:01 UTC 2019 - 1.7K bytes - Viewed (0)