Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for connectionSpec (0.22 sec)

  1. 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)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

      var proxySelector: ProxySelector = RecordingProxySelector()
      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)
  3. 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)
  4. okhttp/src/test/java/okhttp3/internal/connection/RetryConnectionTest.kt

      }
    
      @Test fun someFallbacksSupported() {
        val sslV3 =
          ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
            .tlsVersions(TlsVersion.SSL_3_0)
            .build()
        val routePlanner = factory.newRoutePlanner(client)
        val route = factory.newRoute()
        val connectionSpecs = listOf(ConnectionSpec.MODERN_TLS, ConnectionSpec.COMPATIBLE_TLS, sslV3)
        val enabledSocketTlsVersions =
          arrayOf(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  5. android-test/src/androidTest/java/okhttp/android/test/alpn/AlpnOverrideTest.kt

      fun getWithCustomSocketFactory() {
        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)
  6. 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)
  7. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

            CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
            CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
            CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384);
        final ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
            .cipherSuites(customCipherSuites.toArray(new CipherSuite[0]))
            .build();
    
        X509TrustManager trustManager = defaultTrustManager();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Mar 14 21:57:42 GMT 2019
    - 6.5K bytes
    - Viewed (0)
  8. okhttp-android/src/test/kotlin/okhttp3/android/AndroidLoggingTest.kt

    import org.robolectric.RobolectricTestRunner
    import org.robolectric.shadows.ShadowLog
    
    @RunWith(RobolectricTestRunner::class)
    class AndroidLoggingTest {
      val clientBuilder =
        OkHttpClient.Builder()
          .connectionSpecs(listOf(ConnectionSpec.CLEARTEXT))
          .dns {
            throw UnknownHostException("shortcircuit")
          }
    
      val request = Request("http://google.com/robots.txt".toHttpUrl())
    
      @Test
      fun testHttpLoggingInterceptor() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/Address.kt

      )
      fun protocols(): List<Protocol> = protocols
    
      @JvmName("-deprecated_connectionSpecs")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "connectionSpecs"),
        level = DeprecationLevel.ERROR,
      )
      fun connectionSpecs(): List<ConnectionSpec> = connectionSpecs
    
      @JvmName("-deprecated_proxySelector")
      @Deprecated(
        message = "moved to val",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  10. samples/tlssurvey/src/main/kotlin/okhttp3/survey/Clients.kt

      return Client(
        userAgent = "OkHttp",
        version = OkHttp.VERSION,
        enabled =
          ConnectionSpec.MODERN_TLS.cipherSuites!!.map {
            ianaSuites.fromJavaName(it.javaName)
          },
        supported =
          ConnectionSpec.COMPATIBLE_TLS.cipherSuites!!.map {
            ianaSuites.fromJavaName(it.javaName)
          },
      )
    }
    
    fun historicOkHttp(version: String): Client {
      val enabled =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Apr 02 01:44:15 GMT 2024
    - 2.5K bytes
    - Viewed (0)
Back to top