Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for SSLSocket (0.34 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

      private fun connectTls(
        sslSocket: SSLSocket,
        connectionSpec: ConnectionSpec,
      ) {
        val address = route.address
        var success = false
        try {
          if (connectionSpec.supportsTlsExtensions) {
            Platform.get().configureTlsExtensions(sslSocket, address.url.host, address.protocols)
          }
    
          // Force handshake. This can throw!
          sslSocket.startHandshake()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  2. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

      }
    
      private fun doSsl(socket: Socket): SSLSocket {
        val sslSocket =
          sslSocketFactory.createSocket(
            socket,
            socket.inetAddress.hostAddress,
            socket.port,
            true,
          ) as SSLSocket
        sslSocket.useClientMode = false
        Platform.get().configureTlsExtensions(sslSocket, null, listOf(Protocol.HTTP_2))
        sslSocket.startHandshake()
        return sslSocket
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/internal/MockWebServerSocket.kt

      val scheme: String
        get() =
          when (javaNetSocket) {
            is SSLSocket -> "https"
            else -> "http"
          }
    
      val handshake: Handshake?
        get() = (javaNetSocket as? SSLSocket)?.session?.handshake()
    
      val handshakeServerNames: List<String>
        get() =
          (javaNetSocket as? SSLSocket)
            ?.let { Platform.Companion.get().getHandshakeServerNames(it) }
            ?: listOf()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Platform.kt

      }
    
      /**
       * Configure TLS extensions on `sslSocket` for `route`.
       */
      open fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
        protocols: List<@JvmSuppressWildcards Protocol>,
      ) {
      }
    
      /** Called after the TLS handshake to release resources allocated by [configureTlsExtensions]. */
      open fun afterHandshake(sslSocket: SSLSocket) {
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

                sslSocket.wantClientAuth = true
              }
              openClientSockets.add(sslSocket)
    
              if (protocolNegotiationEnabled) {
                Platform.get().configureTlsExtensions(sslSocket, null, protocols)
              }
    
              sslSocket.startHandshake()
    
              // Wait until after handshake to grab the buffered socket
              socket = MockWebServerSocket(sslSocket)
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  6. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        val trustManager = client.x509TrustManager!!
    
        val delegatingSocketFactory =
          object : DelegatingSSLSocketFactory(sslSocketFactory) {
            override fun configureSocket(sslSocket: SSLSocket): SSLSocket =
              object : DelegatingSSLSocket(sslSocket) {
                override fun getApplicationProtocol(): String = throw UnsupportedOperationException()
              }
          }
    
        client =
          client
            .newBuilder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 14:12:28 UTC 2025
    - 29K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnection.kt

    import java.net.SocketException
    import java.security.cert.X509Certificate
    import java.util.concurrent.TimeUnit.MILLISECONDS
    import javax.net.ssl.SSLPeerUnverifiedException
    import javax.net.ssl.SSLSocket
    import okhttp3.Address
    import okhttp3.Connection
    import okhttp3.Handshake
    import okhttp3.HttpUrl
    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.Route
    import okhttp3.internal.closeQuietly
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 14.9K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

          override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
            sslSocket.enabledCipherSuites = arrayOf(cipherSuite.javaName)
            return super.configureSocket(sslSocket)
          }
        }
      }
    
      private class RecordingSSLSocketFactory(
        delegate: SSLSocketFactory,
      ) : DelegatingSSLSocketFactory(delegate) {
        val socketsCreated = mutableListOf<SSLSocket>()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt

      try {
        close()
      } catch (e: AssertionError) {
        throw e
      } catch (rethrown: RuntimeException) {
        if (rethrown.message == "bio == null") {
          // Conscrypt in Android 10 and 11 may throw closing an SSLSocket. This is safe to ignore.
          // https://issuetracker.google.com/issues/177450597
          return
        }
        throw rethrown
      } catch (_: Exception) {
      }
    }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 10.2K bytes
    - Viewed (1)
  10. okhttp/api/jvm/okhttp.api

    	public final fun -deprecated_tlsVersions ()Ljava/util/List;
    	public final fun cipherSuites ()Ljava/util/List;
    	public fun equals (Ljava/lang/Object;)Z
    	public fun hashCode ()I
    	public final fun isCompatible (Ljavax/net/ssl/SSLSocket;)Z
    	public final fun isTls ()Z
    	public final fun supportsTlsExtensions ()Z
    	public final fun tlsVersions ()Ljava/util/List;
    	public fun toString ()Ljava/lang/String;
    }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
Back to top