Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 89 for SSLSocketFactory (0.05 sec)

  1. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/StandardAndroidSocketAdapter.kt

      sslSocketClass: Class<in SSLSocket>,
      private val sslSocketFactoryClass: Class<in SSLSocketFactory>,
      private val paramClass: Class<*>,
    ) : AndroidSocketAdapter(sslSocketClass) {
      override fun matchesSocketFactory(sslSocketFactory: SSLSocketFactory): Boolean = sslSocketFactoryClass.isInstance(sslSocketFactory)
    
      override fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager? {
        val context: Any? =
          readFieldOrNull(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  2. okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/OpenJSSEPlatform.kt

        }
        return trustManagers[0] as X509TrustManager
      }
    
      override fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager =
        throw UnsupportedOperationException(
          "clientBuilder.sslSocketFactory(SSLSocketFactory) not supported with OpenJSSE",
        )
    
      override fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

          .Builder()
          .addPlatformTrustedCertificates()
          .addInsecureHost(server.hostName)
          .build()
    
      val client =
        OkHttpClient
          .Builder()
          .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
          .build()
    
      fun run() {
        try {
          val request = Request(server.url("/"))
    
          client.newCall(request).execute().use { response ->
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/CallHandshakeTest.kt

          clientTestRule
            .newClientBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            ).hostnameVerifier(RecordingHostnameVerifier())
            .build()
        server.useHttps(handshakeCertificates.sslSocketFactory())
    
        defaultEnabledCipherSuites =
          handshakeCertificates.sslSocketFactory().defaultCipherSuites.toList()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  5. okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/BouncyCastlePlatform.kt

        }
        return trustManagers[0] as X509TrustManager
      }
    
      override fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager =
        throw UnsupportedOperationException(
          "clientBuilder.sslSocketFactory(SSLSocketFactory) not supported with BouncyCastle",
        )
    
      override fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  6. 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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/SessionReuseTest.kt

        }
      }
    
      private fun enableTls() {
        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
    - 6K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionSpecTest.kt

    import assertk.assertions.isFalse
    import assertk.assertions.isNull
    import assertk.assertions.isTrue
    import java.util.concurrent.CopyOnWriteArraySet
    import javax.net.ssl.SSLSocket
    import javax.net.ssl.SSLSocketFactory
    import kotlin.test.assertFailsWith
    import okhttp3.internal.applyConnectionSpec
    import okhttp3.internal.platform.Platform.Companion.isAndroid
    import okhttp3.testing.PlatformRule
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 14.9K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/OpenJSSETest.kt

            .build()
    
        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)
  10. okhttp/src/androidMain/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 newSSLContext(): SSLContext {
        StrictMode.noteSlowCall("newSSLContext")
    
        return super.newSSLContext()
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Jul 20 11:25:50 UTC 2025
    - 4.5K bytes
    - Viewed (0)
Back to top