- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for peerPrincipal (0.08 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/HandshakeTest.kt
assertThat(handshake.peerCertificates).containsExactly( serverCertificate.certificate, serverIntermediate.certificate, ) assertThat(handshake.localPrincipal).isNull() assertThat(handshake.peerPrincipal) .isEqualTo(serverCertificate.certificate.subjectX500Principal) assertThat(handshake.localCertificates).isEmpty() } @Test fun createFromSslSession() { val sslSession = FakeSSLSession(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt
.Builder() .body("abc") .build(), ) val call = client.newCall(Request.Builder().url(server.url("/")).build()) val response = call.execute() assertThat(response.handshake!!.peerPrincipal) .isEqualTo(X500Principal("CN=Local Host")) assertThat(response.handshake!!.localPrincipal) .isEqualTo(X500Principal("CN=Jethro Willis")) assertThat(response.body.string()).isEqualTo("abc") }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 12.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Handshake.kt
@get:JvmName("peerPrincipal") val peerPrincipal: Principal? get() = (peerCertificates.firstOrNull() as? X509Certificate)?.subjectX500Principal @JvmName("-deprecated_peerPrincipal") @Deprecated( message = "moved to val", replaceWith = ReplaceWith(expression = "peerPrincipal"), level = DeprecationLevel.ERROR, ) fun peerPrincipal(): Principal? = peerPrincipal
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Apr 05 09:48:10 UTC 2025 - 6.6K bytes - Viewed (0) -
okhttp-tls/README.md
.url(server.url("/")) .build()); Response response = call.execute(); System.out.println(response.handshake().peerPrincipal()); RecordedRequest recordedRequest = server.takeRequest(); System.out.println(recordedRequest.getHandshake().peerPrincipal()); ``` This handshake is successful because each party has prearranged to trust the root certificate that signs the other party's chain.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 19:32:33 UTC 2025 - 9.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt
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() .addSubjectAlternativeName("example.com")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 4.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt
val tlsVersion: TlsVersion = handshake.tlsVersion() val cipherSuite: CipherSuite = handshake.cipherSuite() val peerCertificates: List<Certificate> = handshake.peerCertificates() val peerPrincipal: Principal? = handshake.peerPrincipal() val localCertificates: List<Certificate> = handshake.localCertificates() val localPrincipal: Principal? = handshake.localPrincipal() } @Test @Disabled fun headers() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RecordedResponse.kt
fun assertHandshake() = apply { val handshake = response!!.handshake!! 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-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSession.kt
override fun getPeerCertificateChain(): Array<X509Certificate> = delegate!!.peerCertificateChain @Throws(SSLPeerUnverifiedException::class) override fun getPeerPrincipal(): Principal = delegate!!.peerPrincipal override fun getLocalPrincipal(): Principal = delegate!!.localPrincipal override fun getCipherSuite(): String = delegate!!.cipherSuite override fun getProtocol(): String = delegate!!.protocol
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
) val tlsVersion: TlsVersion = handshake.tlsVersion val cipherSuite: CipherSuite = handshake.cipherSuite val peerCertificates: List<Certificate> = handshake.peerCertificates val peerPrincipal: Principal? = handshake.peerPrincipal val localCertificates: List<Certificate> = handshake.localCertificates val localPrincipal: Principal? = handshake.localPrincipal } @Test fun headers() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 46.5K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
assertThat(handshake.cipherSuite).isNotNull() assertThat(handshake.localPrincipal).isNotNull() assertThat(handshake.localCertificates.size).isEqualTo(1) assertThat(handshake.peerPrincipal).isNull() assertThat(handshake.peerCertificates.size).isEqualTo(0) } @Test fun httpsWithClientAuth() { platform.assumeNotBouncyCastle() platform.assumeNotConscrypt()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 03 13:16:34 UTC 2025 - 22.3K bytes - Viewed (0)