Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 33 for connectionSpecs (0.19 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-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)
  3. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

          builder.socketFactory(SSLSocketFactory.getDefault())
        }
      }
    
      @Test fun noSslSocketFactoryConfigured() {
        val client =
          OkHttpClient.Builder()
            .connectionSpecs(listOf(ConnectionSpec.CLEARTEXT))
            .build()
        assertFailsWith<IllegalStateException> {
          client.sslSocketFactory
        }
      }
    
      @Test fun nullHostileProtocolList() {
        val nullHostileProtocols =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/SocketChannelTest.kt

              if (socketMode is TlsInstance) {
                if (socketMode.socketMode == Channel) {
                  socketFactory(ChannelSocketFactory())
                }
    
                connectionSpecs(
                  listOf(
                    ConnectionSpec.Builder(ConnectionSpec.COMPATIBLE_TLS)
                      .tlsVersions(socketMode.tlsVersion)
                      .supportsTlsExtensions(socketMode.tlsExtensionMode == STANDARD)
                      .build(),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. okhttp/src/test/java/okhttp3/SessionReuseTest.kt

        }
    
        val sessionIds = mutableListOf<String>()
    
        enableTls()
    
        val tlsVersion = TlsVersion.forJavaName(tlsVersion)
        val spec =
          ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
            .tlsVersions(tlsVersion)
            .build()
    
        var reuseSession = false
    
        val sslContext = handshakeCertificates.sslContext()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 6K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

              }
        }
      }
    }
    
    @SuppressSignatureCheck
    class WiresharkExample(tlsVersions: List<TlsVersion>, private val launch: Launch? = null) {
      private val connectionSpec =
        ConnectionSpec.Builder(ConnectionSpec.RESTRICTED_TLS)
          .tlsVersions(*tlsVersions.toTypedArray())
          .build()
    
      private val eventListenerFactory =
        WireSharkListenerFactory(
          logFile = File("/tmp/key.log"),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/CallTest.kt

        client =
          client.newBuilder()
            .hostnameVerifier(RecordingHostnameVerifier())
            .connectionSpecs(
              // Attempt RESTRICTED_TLS then fall back to MODERN_TLS.
              listOf(
                ConnectionSpec.RESTRICTED_TLS,
                ConnectionSpec.MODERN_TLS,
              ),
            )
            .sslSocketFactory(
              suppressTlsFallbackClientSocketFactory(),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

      internal fun planConnectToRoute(
        route: Route,
        routes: List<Route>? = null,
      ): ConnectPlan {
        if (route.address.sslSocketFactory == null) {
          if (ConnectionSpec.CLEARTEXT !in route.address.connectionSpecs) {
            throw UnknownServiceException("CLEARTEXT communication not enabled for client")
          }
    
          val host = route.address.url.host
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
Back to top