Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for sslContext (0.13 sec)

  1. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        String password = args[1];
        String root = args[2];
        int port = Integer.parseInt(args[3]);
    
        SSLContext sslContext = sslContext(keystoreFile, password);
        SampleServer server = new SampleServer(sslContext, root, port);
        server.run();
      }
    
      private static SSLContext sslContext(String keystoreFile, String password)
          throws GeneralSecurityException, IOException {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Jan 02 02:50:44 UTC 2019
    - 4.7K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/curl/CurlTest.java

                trustManagerFactory.init(keyStore);
    
                SSLContext sslContext = SSLContext.getInstance("TLS");
                sslContext.init(null, trustManagerFactory.getTrustManagers(), null);
    
                Curl.get("https://localhost:9200/").sslSocketFactory(sslContext.getSocketFactory()).execute(response -> {
                    final String content = response.getContentAsString();
    Registered: Thu Oct 31 02:32:13 UTC 2024
    - Last Modified: Mon Nov 14 21:05:19 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

       */
      private SSLSocketFactory defaultSslSocketFactory(X509TrustManager trustManager)
          throws NoSuchAlgorithmException, KeyManagementException {
        SSLContext sslContext = SSLContext.getInstance("TLS");
        sslContext.init(null, new TrustManager[] { trustManager }, null);
    
        return sslContext.getSocketFactory();
      }
    
      /** Returns a trust manager that trusts the VM's default certificate authorities. */
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Mar 14 21:57:42 UTC 2019
    - 6.5K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt

        val trustManager = Platform.get().platformTrustManager()
    
        val sslContext = SSLContext.getInstance("TLS")
        sslContext.init(arrayOf(keyManager), arrayOf(trustManager), SecureRandom())
    
        val client =
          OkHttpClient.Builder()
            .sslSocketFactory(sslContext.socketFactory, trustManager)
            .build()
    
        // An example test URL that returns client certificate details.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/OpenJSSEPlatform.kt

      // and because it's a common pattern for VMs to have differences between supported and
      // defaulted versions for TLS based on what is requested.
      override fun newSSLContext(): SSLContext = SSLContext.getInstance("TLSv1.3", provider)
    
      override fun platformTrustManager(): X509TrustManager {
        val factory =
          TrustManagerFactory.getInstance(
            TrustManagerFactory.getDefaultAlgorithm(),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. okhttp-tls/api/okhttp-tls.api

    	public synthetic fun <init> (Ljavax/net/ssl/X509KeyManager;Ljavax/net/ssl/X509TrustManager;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
    	public final fun keyManager ()Ljavax/net/ssl/X509KeyManager;
    	public final fun sslContext ()Ljavax/net/ssl/SSLContext;
    	public final fun sslSocketFactory ()Ljavax/net/ssl/SSLSocketFactory;
    	public final fun trustManager ()Ljavax/net/ssl/X509TrustManager;
    }
    
    public final class okhttp3/tls/HandshakeCertificates$Builder {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Feb 26 19:17:33 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

        level = DeprecationLevel.ERROR,
      )
      fun trustManager(): X509TrustManager = trustManager
    
      fun sslSocketFactory(): SSLSocketFactory = sslContext().socketFactory
    
      fun sslContext(): SSLContext {
        return Platform.get().newSSLContext().apply {
          init(arrayOf<KeyManager>(keyManager), arrayOf<TrustManager>(trustManager), SecureRandom())
        }
      }
    
      class Builder {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

     *
     * Supported on Android 6.0+ via `NetworkSecurityPolicy`.
     */
    open class Platform {
      /** Prefix used on custom headers. */
      fun getPrefix() = "OkHttp"
    
      open fun newSSLContext(): SSLContext = SSLContext.getInstance("TLS")
    
      open fun platformTrustManager(): X509TrustManager {
        val factory =
          TrustManagerFactory.getInstance(
            TrustManagerFactory.getDefaultAlgorithm(),
          )
    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. src/main/java/org/codelibs/fess/helper/CurlHelper.java

                    trustManagerFactory.init(keyStore);
    
                    final SSLContext sslContext = SSLContext.getInstance("TLS");
                    sslContext.init(null, trustManagerFactory.getTrustManagers(), null);
                    sslSocketFactory = sslContext.getSocketFactory();
                } catch (final Exception e) {
                    logger.warn("Failed to load {}", authorities, e);
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk9Platform.kt

          "clientBuilder.sslSocketFactory(SSLSocketFactory) not supported on JDK 8 (>= 252) or JDK 9+",
        )
      }
    
      override fun newSSLContext(): SSLContext {
        return when {
          majorVersion != null && majorVersion >= 9 ->
            SSLContext.getInstance("TLS")
          else ->
            try {
              // Based on SSLSocket.getApplicationProtocol check we should
              // have TLSv1.3 if we request it.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.5K bytes
    - Viewed (1)
Back to top