- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 43 for useHttps (0.05 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt
.build() } @Test fun clientAuthForWants() { val client = buildClient(clientCert, clientIntermediateCa.certificate) val socketFactory = buildServerSslSocketFactory() server.useHttps(socketFactory) server.requestClientAuth() server.enqueue( MockResponse .Builder() .body("abc") .build(), )
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 12.7K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt
@Test fun clientSendsServerNameAndServerReceivesIt() { // java.net.ConnectException: Connection refused platform.assumeNotConscrypt() val handshakeCertificates = localhost() server.useHttps(handshakeCertificates.sslSocketFactory()) val dns = Dns { Dns.SYSTEM.lookup(server.hostName) } val client = clientTestRule .newClientBuilder()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 6.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt
platform.assumeNotBouncyCastle() } @Test fun `untrusted host in insecureHosts connects successfully`() { val serverCertificates = platform.localhostHandshakeCertificates() server.useHttps(serverCertificates.sslSocketFactory()) server.enqueue(MockResponse()) val clientCertificates = HandshakeCertificates .Builder() .addPlatformTrustedCertificates()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 4.2K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockWebServer.kt
delegate.protocols = protocols } @JvmName("-deprecated_protocols") fun protocols(): List<Protocol> = delegate.protocols fun useHttps( sslSocketFactory: SSLSocketFactory, tunnelProxy: Boolean, ) { delegate.useHttps(sslSocketFactory) } fun noClientAuth() { delegate.noClientAuth() } fun requestClientAuth() { delegate.requestClientAuth()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 00:19:42 UTC 2025 - 4.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
.build() val serverHandshakeCertificates = HandshakeCertificates .Builder() .heldCertificate(certificate, intermediateCa.certificate) .build() server.useHttps(serverHandshakeCertificates.sslSocketFactory()) // The request should complete successfully. server.enqueue( MockResponse .Builder() .body("abc") .build(), )
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 24.3K bytes - Viewed (1) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
override fun createSocket( host: String, port: Int, localHost: InetAddress, localPort: Int, ): Socket? = null } if (useHttps) { server.useHttps(handshakeCertificates.sslSocketFactory()) client = client .newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(),
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
import okhttp3.tls.HandshakeCertificates import okhttp3.tls.internal.TlsUtil class DevServer { val handshakeCertificates = TlsUtil.localhost() val server = MockWebServer().apply { useHttps(handshakeCertificates.sslSocketFactory(), false) enqueue( MockResponse() .setResponseCode(HTTP_MOVED_TEMP) .setHeader("Location", "https://www.google.com/robots.txt"), ) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.9K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt
.assertLogMatch(Regex("""connectionReleased""")) .assertLogMatch(Regex("""callEnd""")) .assertNoMoreLogs() } @Test fun secureGet() { assumeNotWindows() server.useHttps(handshakeCertificates.sslSocketFactory()) url = server.url("/") server.enqueue(MockResponse()) val response = client.newCall(request().build()).execute() assertThat(response.body).isNotNull()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 10.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/OpenJSSETest.kt
client = client .newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ).build() server.useHttps(handshakeCertificates.sslSocketFactory()) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 3.7K bytes - Viewed (0) -
okhttp-tls/README.md
policy: ```java HandshakeCertificates serverCertificates = new HandshakeCertificates.Builder() .heldCertificate(localhostCertificate) .build(); MockWebServer server = new MockWebServer(); server.useHttps(serverCertificates.sslSocketFactory(), false); ``` `HandshakeCertificates` also works for clients where its job is to define which root certificates
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 19:32:33 UTC 2025 - 9.1K bytes - Viewed (0)