Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 52 for SSLSocket (0.05 sec)

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

              Platform.get().getSelectedProtocol(sslSocket)
            } else {
              null
            }
          socket = sslSocket
          source = sslSocket.source().buffer()
          sink = sslSocket.sink().buffer()
          protocol = if (maybeProtocol != null) Protocol.get(maybeProtocol) else Protocol.HTTP_1_1
          success = true
        } finally {
          Platform.get().afterHandshake(sslSocket)
          if (!success) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

          return configureSocket((SSLSocket) delegate.createSocket(
              address, port, localAddress, localPort));
        }
    
        protected SSLSocket configureSocket(SSLSocket socket) throws IOException {
          return socket;
        }
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build();
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Mar 14 21:57:42 UTC 2019
    - 6.5K bytes
    - Viewed (0)
  3. samples/tlssurvey/src/main/kotlin/okhttp3/survey/Clients.kt

    ): Client {
      val socketFactory = SSLSocketFactory.getDefault() as SSLSocketFactory
      val sslSocket = socketFactory.createSocket() as SSLSocket
    
      return Client(
        userAgent = name,
        version = version,
        enabled = sslSocket.enabledCipherSuites.map { ianaSuites.fromJavaName(it) },
        supported = sslSocket.supportedCipherSuites.map { ianaSuites.fromJavaName(it) },
      )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Apr 02 01:44:15 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/JSSETest.kt

                  override fun connectionAcquired(
                    call: Call,
                    connection: Connection,
                  ) {
                    val sslSocket = connection.socket() as SSLSocket
    
                    sessionIds.add(sslSocket.session.id.toByteString().hex())
                  }
                },
              ),
            )
            .build()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/android/ConscryptSocketAdapter.kt

     */
    class ConscryptSocketAdapter : SocketAdapter {
      override fun matchesSocket(sslSocket: SSLSocket): Boolean = Conscrypt.isConscrypt(sslSocket)
    
      override fun isSupported(): Boolean = ConscryptPlatform.isSupported
    
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? =
        when {
          matchesSocket(sslSocket) -> Conscrypt.getApplicationProtocol(sslSocket)
          else -> null // No TLS extensions if the socket class is custom.
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/platform/android/BouncyCastleSocketAdapter.kt

      override fun getSelectedProtocol(sslSocket: SSLSocket): String? {
        val s = sslSocket as BCSSLSocket
    
        return when (val protocol = s.applicationProtocol) {
          null, "" -> null
          else -> protocol
        }
      }
    
      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
    - 2.1K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/platform/android/Android10SocketAdapter.kt

    @SuppressSignatureCheck
    class Android10SocketAdapter : SocketAdapter {
      override fun matchesSocket(sslSocket: SSLSocket): Boolean = SSLSockets.isSupportedSocket(sslSocket)
    
      override fun isSupported(): Boolean = Companion.isSupported()
    
      @SuppressLint("NewApi")
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? {
        return try {
          // SSLSocket.getApplicationProtocol returns "" if application protocols values will not
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  8. android-test/src/androidTest/java/okhttp/android/test/alpn/AlpnOverrideTest.kt

        override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            val parameters = sslSocket.sslParameters
            Log.d("CustomSSLSocketFactory", "old applicationProtocols: $parameters.applicationProtocols")
            parameters.applicationProtocols = arrayOf("x-amzn-http-ca")
            sslSocket.sslParameters = parameters
          }
    
          return sslSocket
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt

            )
          putMethod.invoke(null, sslSocket, alpnProvider)
        } catch (e: InvocationTargetException) {
          throw AssertionError("failed to set ALPN", e)
        } catch (e: IllegalAccessException) {
          throw AssertionError("failed to set ALPN", e)
        }
      }
    
      override fun afterHandshake(sslSocket: SSLSocket) {
        try {
          removeMethod.invoke(null, sslSocket)
        } catch (e: IllegalAccessException) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocketFactory.kt

        host: String,
        port: Int,
        autoClose: Boolean,
      ): SSLSocket {
        val sslSocket = delegate.createSocket(socket, host, port, autoClose) as SSLSocket
        return configureSocket(sslSocket)
      }
    
      @Throws(IOException::class)
      protected open fun configureSocket(sslSocket: SSLSocket): SSLSocket {
        // No-op by default.
        return sslSocket
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.8K bytes
    - Viewed (0)
Back to top