Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 49 for sslContext (0.18 sec)

  1. docs/features/https.md

            try {
              trustManager = trustManagerForCertificates(trustedCertificatesInputStream());
              SSLContext sslContext = SSLContext.getInstance("TLS");
              sslContext.init(null, new TrustManager[] { trustManager }, null);
              sslSocketFactory = sslContext.getSocketFactory();
            } catch (GeneralSecurityException e) {
              throw new RuntimeException(e);
            }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Dec 24 00:16:30 UTC 2022
    - 10.5K bytes
    - Viewed (0)
  2. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

            ) {}
    
            override fun getAcceptedIssuers(): Array<X509Certificate> = arrayOf()
          }
    
        val sslContext =
          Platform.get().newSSLContext().apply {
            init(null, arrayOf(trustManager), null)
          }
        val sslSocketFactory = sslContext.socketFactory
    
        val hostnameVerifier = HostnameVerifier { _, _ -> true }
    
        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)
  3. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

      }
    
      @Test
      fun testUrlConnectionSecureDirect() {
        val keyStoreFactory = KeyStoreFactory(Configuration.configuration(), MockServerLogger())
        HttpsURLConnection.setDefaultSSLSocketFactory(keyStoreFactory.sslContext().socketFactory)
    
        testRequest {
          val url = URI(mockServer.secureEndpoint + "/person?name=peter").toURL()
    
          val connection = url.openConnection() as HttpURLConnection
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/SessionReuseTest.kt

        val spec =
          ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
            .tlsVersions(tlsVersion)
            .build()
    
        var reuseSession = false
    
        val sslContext = handshakeCertificates.sslContext()
        val systemSslSocketFactory = sslContext.socketFactory
        val sslSocketFactory =
          object : DelegatingSSLSocketFactory(systemSslSocketFactory) {
            override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/BouncyCastlePlatform.kt

     */
    class BouncyCastlePlatform private constructor() : Platform() {
      private val provider: Provider = BouncyCastleJsseProvider()
    
      override fun newSSLContext(): SSLContext = SSLContext.getInstance("TLS", provider)
    
      override fun platformTrustManager(): X509TrustManager {
        val factory =
          TrustManagerFactory.getInstance(
            "PKIX",
            BouncyCastleJsseProvider.PROVIDER_NAME,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/platform/android/AndroidSocketAdapterTest.kt

      @RegisterExtension @JvmField
      val platform = PlatformRule()
    
      @BeforeEach
      fun setUp() {
        platform.assumeConscrypt()
      }
    
      val context: SSLContext by lazy {
        val provider: Provider = Conscrypt.newProviderBuilder().provideTrustManager(true).build()
    
        SSLContext.getInstance("TLS", provider).apply {
          init(null, null, null)
        }
      }
    
      @ParameterizedTest
      @MethodSource("data")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt

      // See release notes https://groups.google.com/forum/#!forum/conscrypt
      // for version differences
      override fun newSSLContext(): SSLContext =
        // supports TLSv1.3 by default (version api is >= 1.4.0)
        SSLContext.getInstance("TLS", provider)
    
      override fun platformTrustManager(): X509TrustManager {
        val trustManagers =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt

              Arrays.asList(serverRootCa.certificate, clientRootCa.certificate),
              emptyList(),
            )
          val sslContext = SSLContext.getInstance("TLS")
          sslContext.init(
            arrayOf<KeyManager>(keyManager),
            arrayOf<TrustManager>(trustManager),
            SecureRandom(),
          )
          sslContext.socketFactory
        } catch (e: GeneralSecurityException) {
          throw AssertionError(e)
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

              uri: URI,
              socketAddress: SocketAddress,
              e: IOException,
            ) {}
          }
    
        val trustManager = get().platformTrustManager()
        val sslContext = get().newSSLContext()
        sslContext.init(null, null, null)
    
        // new client, may share all same fields but likely different connection pool
        assertNotSame(
          client.routeDatabase,
          OkHttpClient.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

            println("Usage: Http2Server <base directory>")
            return
          }
          val server =
            Http2Server(
              File(args[0]),
              localhost().sslContext().socketFactory,
            )
          server.run()
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top