- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for useHttps (0.05 sec)
-
okhttp/src/test/java/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 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/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K 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() .sslSocketFactory(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.9K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockWebServer.kt
replaceWith = ReplaceWith(expression = "protocols"), level = DeprecationLevel.ERROR, ) 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 5.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
HandshakeCertificates serverCertificates = new HandshakeCertificates.Builder() .heldCertificate(localhostCertificate) .build(); MockWebServer server = new MockWebServer(); server.useHttps(serverCertificates.sslSocketFactory(), false); server.enqueue(new MockResponse()); HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 02 14:04:37 UTC 2023 - 2.1K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
mockWebServer.bodyLimit = 0L mockWebServer.protocolNegotiationEnabled = false mockWebServer.protocols = listOf() val protocols: List<Protocol> = mockWebServer.protocols mockWebServer.useHttps(SSLSocketFactory.getDefault() as SSLSocketFactory, false) mockWebServer.noClientAuth() mockWebServer.requestClientAuth() mockWebServer.requireClientAuth()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 9.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/OpenJSSETest.kt
client = client.newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ) .build() server.useHttps(handshakeCertificates.sslSocketFactory()) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 3.7K bytes - Viewed (0) -
okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt
OkHttpClient.Builder() .dns(AsyncDns.toDns(AndroidAsyncDns.IPv4, AndroidAsyncDns.IPv6)) .sslSocketFactory(localhost.sslSocketFactory(), localhost.trustManager) .build() serverRule.server.useHttps(localhost.sslSocketFactory()) } @Test @Ignore("java.net.UnknownHostException: No results for localhost, in CI.") fun testRequest() { serverRule.server.enqueue(MockResponse())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt
} fileSystem.write(metadataFile) { writeUtf8(corruptor(contents)) } } } private fun testCorruptingCache(corruptor: () -> Unit): Response { server.useHttps(handshakeCertificates.sslSocketFactory()) server.enqueue( MockResponse( headers = headersOf( "Last-Modified", formatDate(-1, TimeUnit.HOURS)!!,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 6K bytes - Viewed (0)