Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for ConnectionSpec (0.43 sec)

  1. okhttp/src/main/kotlin/okhttp3/ConnectionSpec.kt

        internal constructor(tls: Boolean) {
          this.tls = tls
        }
    
        constructor(connectionSpec: ConnectionSpec) {
          this.tls = connectionSpec.isTls
          this.cipherSuites = connectionSpec.cipherSuitesAsString
          this.tlsVersions = connectionSpec.tlsVersionsAsString
          this.supportsTlsExtensions = connectionSpec.supportsTlsExtensions
        }
    
        fun allEnabledCipherSuites() =
          apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/internal.kt

    internal fun cacheGet(
      cache: Cache,
      request: Request,
    ): Response? = cache.get(request)
    
    internal fun applyConnectionSpec(
      connectionSpec: ConnectionSpec,
      sslSocket: SSLSocket,
      isFallback: Boolean,
    ) = connectionSpec.apply(sslSocket, isFallback)
    
    internal fun ConnectionSpec.effectiveCipherSuites(socketEnabledCipherSuites: Array<String>): Array<String> {
      return if (cipherSuitesAsString != null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CallHandshakeTest.kt

      }
    
      private fun makeClient(
        connectionSpec: ConnectionSpec? = null,
        tlsVersion: TlsVersion? = null,
        cipherSuites: List<CipherSuite>? = null,
      ): OkHttpClient {
        return this.client.newBuilder()
          .apply {
            if (connectionSpec != null) {
              connectionSpecs(
                listOf(
                  ConnectionSpec.Builder(connectionSpec)
                    .apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/TestTls13Request.kt

     * available in JDK11 or Conscrypt.
     */
    private val TLS_13 =
      ConnectionSpec.Builder(true)
        .cipherSuites(*TLS13_CIPHER_SUITES.toTypedArray())
        .tlsVersions(TlsVersion.TLS_1_3)
        .build()
    
    private val TLS_12 =
      ConnectionSpec.Builder(ConnectionSpec.RESTRICTED_TLS)
        .tlsVersions(TlsVersion.TLS_1_2)
        .build()
    
    private fun testClient(
      urls: List<String>,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            val connectionSpec = connectionSpecs[tlsEquipPlan.connectionSpecIndex]
    
            // Figure out the next connection spec in case we need a retry.
            retryTlsConnection = tlsEquipPlan.nextConnectionSpec(connectionSpecs, sslSocket)
    
            connectionSpec.apply(sslSocket, isFallback = tlsEquipPlan.isTlsFallback)
            connectTls(sslSocket, connectionSpec)
            user.secureConnectEnd(handshake)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/ConnectionSpecTest.kt

        val allCipherSuites =
          ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
            .allEnabledCipherSuites()
            .build()
        val allTlsVersions =
          ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
            .allEnabledTlsVersions()
            .build()
        val set: MutableSet<Any> = CopyOnWriteArraySet()
        assertThat(set.add(ConnectionSpec.MODERN_TLS)).isTrue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

      var proxyAuthenticator: Authenticator = RecordingOkAuthenticator("password", null)
      var connectionSpecs: List<ConnectionSpec> =
        listOf(
          ConnectionSpec.MODERN_TLS,
          ConnectionSpec.COMPATIBLE_TLS,
          ConnectionSpec.CLEARTEXT,
        )
      var protocols: List<Protocol> =
        listOf(
          Protocol.HTTP_1_1,
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CipherSuiteTest.kt

        socket.enabledCipherSuites = arrayOf("SSL_A", "SSL_B", "SSL_C")
        val connectionSpec =
          ConnectionSpec.Builder(true)
            .tlsVersions(TlsVersion.TLS_1_0)
            .cipherSuites("TLS_A", "TLS_C", "TLS_E")
            .build()
        applyConnectionSpec(connectionSpec, socket, false)
        assertArrayEquals(arrayOf("TLS_A", "TLS_C"), socket.enabledCipherSuites)
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  9. android-test/src/androidTest/java/okhttp/android/test/alpn/AlpnOverrideTest.kt

        client =
          client.newBuilder()
            .sslSocketFactory(CustomSSLSocketFactory(client.sslSocketFactory), client.x509TrustManager!!)
            .connectionSpecs(
              listOf(
                ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
                  .supportsTlsExtensions(false)
                  .build(),
              ),
            )
            .eventListener(
              object : EventListener() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun connectionSpec() {
        var connectionSpec: ConnectionSpec = ConnectionSpec.RESTRICTED_TLS
        connectionSpec = ConnectionSpec.MODERN_TLS
        connectionSpec = ConnectionSpec.COMPATIBLE_TLS
        connectionSpec = ConnectionSpec.CLEARTEXT
        val tlsVersions: List<TlsVersion>? = connectionSpec.tlsVersions
        val cipherSuites: List<CipherSuite>? = connectionSpec.cipherSuites
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
Back to top