Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 87 for SSLSocketFactory (0.12 sec)

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

      sslSocketClass: Class<in SSLSocket>,
      private val sslSocketFactoryClass: Class<in SSLSocketFactory>,
      private val paramClass: Class<*>,
    ) : AndroidSocketAdapter(sslSocketClass) {
      override fun matchesSocketFactory(sslSocketFactory: SSLSocketFactory): Boolean = sslSocketFactoryClass.isInstance(sslSocketFactory)
    
      override fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager? {
        val context: Any? =
          readFieldOrNull(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/InsecureForHostTest.kt

        server.useHttps(serverCertificates.sslSocketFactory())
        server.enqueue(MockResponse())
    
        val clientCertificates =
          HandshakeCertificates.Builder()
            .addPlatformTrustedCertificates()
            .addInsecureHost(server.hostName)
            .build()
    
        val client =
          clientTestRule.newClientBuilder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Address.kt

      @JvmName("-deprecated_sslSocketFactory")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "sslSocketFactory"),
        level = DeprecationLevel.ERROR,
      )
      fun sslSocketFactory(): SSLSocketFactory? = sslSocketFactory
    
      @JvmName("-deprecated_hostnameVerifier")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "hostnameVerifier"),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/platform/OpenJSSEPlatform.kt

        }
        return trustManagers[0] as X509TrustManager
      }
    
      override fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager =
        throw UnsupportedOperationException(
          "clientBuilder.sslSocketFactory(SSLSocketFactory) not supported with OpenJSSE",
        )
    
      override fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/ConnectionSpecTest.kt

    import assertk.assertions.isFalse
    import assertk.assertions.isNull
    import assertk.assertions.isTrue
    import java.util.concurrent.CopyOnWriteArraySet
    import javax.net.ssl.SSLSocket
    import javax.net.ssl.SSLSocketFactory
    import kotlin.test.assertFailsWith
    import okhttp3.internal.applyConnectionSpec
    import okhttp3.internal.platform.Platform.Companion.isAndroid
    import okhttp3.testing.PlatformRule
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

            .build();
    
        X509TrustManager trustManager = defaultTrustManager();
        SSLSocketFactory sslSocketFactory = defaultSslSocketFactory(trustManager);
        SSLSocketFactory customSslSocketFactory = new DelegatingSSLSocketFactory(sslSocketFactory) {
          @Override protected SSLSocket configureSocket(SSLSocket socket) throws IOException {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Mar 14 21:57:42 UTC 2019
    - 6.5K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

        HandshakeCertificates.Builder()
          .addPlatformTrustedCertificates()
          .addInsecureHost(server.hostName)
          .build()
    
      val client =
        OkHttpClient.Builder()
          .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
          .build()
    
      fun run() {
        try {
          val request = Request(server.url("/"))
    
          client.newCall(request).execute().use { response ->
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

          "Unexpected default trust managers: ${trustManagers.contentToString()}"
        }
        return trustManagers[0] as X509TrustManager
      }
    
      open fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager? {
        return try {
          // Attempt to get the trust manager from an OpenJDK socket factory. We attempt this on all
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  9. android-test/src/androidTest/java/okhttp/android/test/alpn/AlpnOverrideTest.kt

          }
    
          return sslSocket
        }
      }
    
      var client = OkHttpClient()
    
      @Test
      fun getWithCustomSocketFactory() {
        client =
          client.newBuilder()
            .sslSocketFactory(CustomSSLSocketFactory(client.sslSocketFactory), client.x509TrustManager!!)
            .connectionSpecs(
              listOf(
                ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
                  .supportsTlsExtensions(false)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  10. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

          Platform.get().newSSLContext().apply {
            init(null, arrayOf(trustManager), null)
          }
        val sslSocketFactory = sslContext.socketFactory
    
        val hostnameVerifier = HostnameVerifier { _, _ -> true }
    
        client =
          client.newBuilder()
            .sslSocketFactory(sslSocketFactory, trustManager)
            .hostnameVerifier(hostnameVerifier)
            .build()
    
    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