Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 52 for SSLSocket (0.1 sec)

  1. android-test/src/androidTest/java/okhttp/android/test/sni/SniOverrideTest.kt

          override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
              val parameters = sslSocket.sslParameters
              val sni = parameters.serverNames
              Log.d("CustomSSLSocketFactory", "old SNI: $sni")
              parameters.serverNames = mutableListOf<SNIServerName>(SNIHostName("cloudflare-dns.com"))
              sslSocket.sslParameters = parameters
            }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/ConnectionSpec.kt

      /** Applies this spec to [sslSocket]. */
      internal fun apply(
        sslSocket: SSLSocket,
        isFallback: Boolean,
      ) {
        val specToApply = supportedSpec(sslSocket, isFallback)
    
        if (specToApply.tlsVersions != null) {
          sslSocket.enabledProtocols = specToApply.tlsVersionsAsString
        }
    
        if (specToApply.cipherSuites != null) {
          sslSocket.enabledCipherSuites = specToApply.cipherSuitesAsString
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/SessionReuseTest.kt

        val systemSslSocketFactory = sslContext.socketFactory
        val sslSocketFactory =
          object : DelegatingSSLSocketFactory(systemSslSocketFactory) {
            override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
              return sslSocket.apply {
                if (reuseSession) {
                  this.enableSessionCreation = false
                }
              }
            }
          }
    
        client =
          client.newBuilder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/connection/RetryConnectionTest.kt

      }
    
      private fun createSocketWithEnabledProtocols(vararg tlsVersions: TlsVersion): SSLSocket {
        return (handshakeCertificates.sslSocketFactory().createSocket() as SSLSocket).apply {
          enabledProtocols = javaNames(*tlsVersions)
        }
      }
    
      private fun assertEnabledProtocols(
        socket: SSLSocket,
        vararg required: TlsVersion,
      ) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/SocketChannelTest.kt

                }
    
                val serverSslSocketFactory =
                  object : DelegatingSSLSocketFactory(sslSocketFactory) {
                    override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
                      return sslSocket.apply {
                        sslParameters =
                          sslParameters.apply {
                            sniMatchers =
                              listOf(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt

    import javax.net.ssl.HandshakeCompletedListener
    import javax.net.ssl.SSLParameters
    import javax.net.ssl.SSLSession
    import javax.net.ssl.SSLSocket
    
    /** An [SSLSocket] that delegates all calls.  */
    abstract class DelegatingSSLSocket(protected val delegate: SSLSocket?) : SSLSocket() {
      @Throws(IOException::class)
      override fun shutdownInput() {
        delegate!!.shutdownInput()
      }
    
      @Throws(IOException::class)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

                  raw.port,
                  true,
                )
              val sslSocket = socket as SSLSocket
              sslSocket.useClientMode = false
              if (clientAuth == CLIENT_AUTH_REQUIRED) {
                sslSocket.needClientAuth = true
              } else if (clientAuth == CLIENT_AUTH_REQUESTED) {
                sslSocket.wantClientAuth = true
              }
              openClientSockets.add(socket)
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

        }
    
        override fun connectionAcquired(
          call: Call,
          connection: Connection,
        ) {
          if (random != null) {
            val sslSocket = connection.socket() as SSLSocket
            val session = sslSocket.session
    
            val masterSecretHex =
              session.masterSecret?.encoded?.toByteString()
                ?.hex()
    
            if (masterSecretHex != null) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/platform/Jdk9PlatformTest.kt

     */
    package okhttp3.internal.platform
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNotNull
    import assertk.assertions.isNull
    import javax.net.ssl.SSLSocket
    import okhttp3.DelegatingSSLSocket
    import okhttp3.internal.platform.Jdk9Platform.Companion.buildIfSupported
    import okhttp3.testing.PlatformRule
    import org.junit.jupiter.api.Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

        val eventListener =
          object : EventListener() {
            var socket: SSLSocket? = null
            var closed = false
    
            override fun connectionAcquired(
              call: Call,
              connection: Connection,
            ) {
              socket = connection.socket() as SSLSocket
            }
    
            override fun requestHeadersStart(call: Call) {
              if (closed) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top