Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for getApplicationProtocol (0.14 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/platform/android/Android10SocketAdapter.kt

      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
          // be used. Observed if you didn't specify SSLParameters.setApplicationProtocols
          when (val protocol = sslSocket.applicationProtocol) {
            null, "" -> null
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk9Platform.kt

        sslSocket.sslParameters = sslParameters
      }
    
      @SuppressSignatureCheck
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? {
        return try {
          // SSLSocket.getApplicationProtocol returns "" if application protocols values will not
          // be used. Observed if you didn't specify SSLParameters.setApplicationProtocols
          when (val protocol = sslSocket.applicationProtocol) {
            null, "" -> null
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.5K bytes
    - Viewed (1)
  3. okhttp/src/test/java/okhttp3/internal/platform/Jdk9PlatformTest.kt

        platform.assumeJdk9()
        assertThat(buildIfSupported()).isNotNull()
      }
    
      @Test
      fun buildsWhenJdk8() {
        platform.assumeJdk8()
        try {
          SSLSocket::class.java.getMethod("getApplicationProtocol")
          // also present on JDK8 after build 252.
          assertThat(buildIfSupported()).isNotNull()
        } catch (nsme: NoSuchMethodException) {
          assertThat(buildIfSupported()).isNull()
        }
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/platform/android/ConscryptSocketAdapter.kt

      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.
        }
    
      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.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt

          super.configureTlsExtensions(sslSocket, hostname, protocols)
        }
      }
    
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? =
        if (Conscrypt.isConscrypt(sslSocket)) {
          Conscrypt.getApplicationProtocol(sslSocket)
        } else {
          super.getSelectedProtocol(sslSocket)
        }
    
      override fun newSslSocketFactory(trustManager: X509TrustManager): SSLSocketFactory {
        return newSSLContext().apply {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt

      override fun getChannel(): SocketChannel {
        return delegate!!.channel
      }
    
      override fun getHandshakeSession(): SSLSession {
        return delegate!!.handshakeSession
      }
    
      override fun getApplicationProtocol(): String {
        return delegate!!.applicationProtocol
      }
    
      override fun getHandshakeApplicationProtocol(): String {
        return delegate!!.handshakeApplicationProtocol
      }
    
    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. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

          object : DelegatingSSLSocketFactory(sslSocketFactory) {
            override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
              return object : DelegatingSSLSocket(sslSocket) {
                override fun getApplicationProtocol(): String {
                  throw UnsupportedOperationException()
                }
              }
            }
          }
    
        client =
          client.newBuilder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 27K bytes
    - Viewed (0)
Back to top