- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 87 for sslSocketFactory (0.11 sec)
-
okhttp-tls/README.md
returns to its clients. The returned instance can create an `SSLSocketFactory` that implements this policy: ```java HandshakeCertificates serverCertificates = new HandshakeCertificates.Builder() .heldCertificate(localhostCertificate) .build(); MockWebServer server = new MockWebServer(); server.useHttps(serverCertificates.sslSocketFactory(), false); ```
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 9.1K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt
import okio.buffer import okio.source /** A basic HTTP/2 server that serves the contents of a local directory. */ class Http2Server( private val baseDirectory: File, private val sslSocketFactory: SSLSocketFactory, ) : Http2Connection.Listener() { private fun run() { val serverSocket = ServerSocket(8888) serverSocket.reuseAddress = true while (true) { var socket: Socket? = null try {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/AndroidPlatform.kt
throw IOException("Exception in connect", e) } else { throw e } } } override fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager? = socketAdapters.find { it.matchesSocketFactory(sslSocketFactory) } ?.trustManager(sslSocketFactory) override fun configureTlsExtensions( sslSocket: SSLSocket, hostname: String?, protocols: List<@JvmSuppressWildcards Protocol>,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/Android10Platform.kt
DeferredSocketAdapter(BouncyCastleSocketAdapter.factory), ).filter { it.isSupported() } override fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager? = socketAdapters.find { it.matchesSocketFactory(sslSocketFactory) } ?.trustManager(sslSocketFactory) override fun configureTlsExtensions( sslSocket: SSLSocket, hostname: String?, protocols: List<Protocol>, ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/FallbackTestClientSocketFactory.kt
* limitations under the License. */ package okhttp3 import javax.net.ssl.SSLSocket import javax.net.ssl.SSLSocketFactory import okhttp3.FallbackTestClientSocketFactory.Companion.TLS_FALLBACK_SCSV /** * An SSLSocketFactory that delegates calls. Sockets created by the delegate are wrapped with ones * that will not accept the [TLS_FALLBACK_SCSV] cipher, thus bypassing server-side fallback
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java
server.useHttps(serverCertificates.sslSocketFactory(), false); server.enqueue(new MockResponse()); HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder() .addTrustedCertificate(localhostCertificate.certificate()) .build(); OkHttpClient client = new OkHttpClient.Builder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager()) .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 02 14:04:37 UTC 2023 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/android/SocketAdapter.kt
import javax.net.ssl.SSLSocket import javax.net.ssl.SSLSocketFactory import javax.net.ssl.X509TrustManager import okhttp3.Protocol interface SocketAdapter { fun isSupported(): Boolean fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager? = null fun matchesSocket(sslSocket: SSLSocket): Boolean fun matchesSocketFactory(sslSocketFactory: SSLSocketFactory): Boolean = false fun configureTlsExtensions(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocketChannelTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
HandshakeCertificates.Builder() .addTrustedCertificate(rootCa.certificate) .build() val client = clientTestRule.newClientBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ) .hostnameVerifier(RecordingHostnameVerifier()) .certificatePinner(certificatePinner) .build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.8K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
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() val request: RecordedRequest = mockWebServer.takeRequest()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0)