- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for peerCertificate (0.19 sec)
-
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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.8K bytes - Viewed (0) -
okhttp/src/test/java/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,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
okhttp/src/main/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
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.8K bytes - Viewed (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()); } } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jul 26 06:37:08 UTC 2021 - 1.9K bytes - Viewed (0) -
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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 7.1K bytes - Viewed (0) -
okhttp/src/test/java/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.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (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); } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 14:55:09 UTC 2024 - 2.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CertificatePinning.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 08 21:30:01 UTC 2019 - 1.7K bytes - Viewed (0) -
okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.3K bytes - Viewed (0)