- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 14 for peerCertificates (0.08 seconds)
-
okhttp/src/jvmTest/kotlin/okhttp3/HandshakeTest.kt
cipherSuite = CipherSuite.TLS_AES_128_GCM_SHA256, peerCertificates = listOf(serverCertificate.certificate, serverIntermediate.certificate), localCertificates = listOf(), ) assertThat(handshake.tlsVersion).isEqualTo(TlsVersion.TLS_1_3) assertThat(handshake.cipherSuite).isEqualTo(CipherSuite.TLS_AES_128_GCM_SHA256) assertThat(handshake.peerCertificates).containsExactly( serverCertificate.certificate,Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 4.2K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Handshake.kt
message = "moved to val", replaceWith = ReplaceWith(expression = "peerCertificates"), level = DeprecationLevel.ERROR, ) fun peerCertificates(): List<Certificate> = peerCertificates /** Returns the remote peer's principle, or null if that peer is anonymous. */ @get:JvmName("peerPrincipal") val peerPrincipal: Principal? get() = (peerCertificates.firstOrNull() as? X509Certificate)?.subjectX500Principal
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Apr 05 09:48:10 GMT 2025 - 6.6K bytes - Click Count (1) -
okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt
.isEqualTo(serverHandshake.peerCertificates) assertThat(listOf(serverCertificate.certificate, serverIntermediate.certificate)) .isEqualTo(serverHandshake.localCertificates) val clientHandshake = clientHandshakeFuture.get() assertThat(listOf(serverCertificate.certificate, serverIntermediate.certificate)) .isEqualTo(clientHandshake.peerCertificates)
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 7.2K bytes - Click Count (0) -
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); } }Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Mon Apr 15 14:55:09 GMT 2024 - 2.1K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt
assertThat(response.handshake!!.tlsVersion).isNotNull() assertThat(response.handshake!!.localCertificates).isEmpty() assertThat(response.handshake!!.localPrincipal).isNull() assertThat(response.handshake!!.peerCertificates).isEmpty() assertThat(response.handshake!!.peerPrincipal).isNull() } @Test fun `bad certificates host in insecureHosts fails with SSLException`() { val heldCertificate = HeldCertificate
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 4.2K bytes - Click Count (0) -
regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java
assertTrue(response.code() == 200 || response.code() == 404); assertEquals(Protocol.HTTP_2, response.protocol()); for (Certificate c: response.handshake().peerCertificates()) { X509Certificate x = (X509Certificate) c; System.out.println(x.getSubjectDN()); } } }
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Mon Jul 26 06:37:08 GMT 2021 - 1.9K bytes - Click Count (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()Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 8.8K bytes - Click Count (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CertificatePinning.kt
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 1.4K bytes - Click Count (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(); }Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sun Dec 08 21:30:01 GMT 2019 - 1.7K bytes - Click Count (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) } /**
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Dec 27 13:39:56 GMT 2024 - 5.3K bytes - Click Count (0)