Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for trustManagers (0.14 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt

         * TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
         * if (trustManagers.length != 1 || !(trustManagers[0] instanceof X509TrustManager)) {
         *     throw new IllegalStateException("Unexpected default trust managers:"
         *         + Arrays.toString(trustManagers));
         * }
         * X509TrustManager trustManager = (X509TrustManager) trustManagers[0];
         *
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:55:03 UTC 2025
    - 51.4K bytes
    - Viewed (0)
  2. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

          Security.insertProviderAt(BouncyCastleJsseProvider(), 2)
    
          var socketClass: String? = null
    
          val trustManager =
            TrustManagerFactory
              .getInstance(TrustManagerFactory.getDefaultAlgorithm())
              .apply {
                init(null as KeyStore?)
              }.trustManagers
              .first() as X509TrustManager
    
          val sslContext =
            Platform.get().newSSLContext().apply {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 29.9K bytes
    - Viewed (0)
  3. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/AndroidPlatform.kt

          else -> true
        }
    
      override fun buildCertificateChainCleaner(trustManager: X509TrustManager): CertificateChainCleaner =
        AndroidCertificateChainCleaner.buildIfSupported(trustManager) ?: super.buildCertificateChainCleaner(trustManager)
    
      override fun buildTrustRootIndex(trustManager: X509TrustManager): TrustRootIndex =
        try {
          StrictMode.noteSlowCall("buildTrustRootIndex")
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 10 05:19:46 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt

            )
          val trustManager =
            newTrustManager(
              null,
              Arrays.asList(serverRootCa.certificate, clientRootCa.certificate),
              emptyList(),
            )
          val sslContext = SSLContext.getInstance("TLS")
          sslContext.init(
            arrayOf<KeyManager>(keyManager),
            arrayOf<TrustManager>(trustManager),
            SecureRandom(),
          )
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 13K bytes
    - Viewed (0)
  5. okhttp-tls/README.md

        .addTrustedCertificate(localhostCertificate.certificate())
        .build();
    OkHttpClient client = new OkHttpClient.Builder()
        .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
        .build();
    ```
    
    With a server that holds a certificate and a client that trusts it we have enough for an HTTPS
    handshake. The best part of this example is that we don't need to make our test code insecure with a
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Oct 30 21:39:59 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/SessionReuseTest.kt

                        .toByteString()
                        .hex(),
                    )
                  }
                },
              ),
            ).sslSocketFactory(sslSocketFactory, handshakeCertificates.trustManager)
            .build()
    
        server.enqueue(MockResponse(body = "abc1"))
        server.enqueue(MockResponse(body = "abc2"))
    
        val request = Request(server.url("/"))
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 01 12:18:11 UTC 2025
    - 5.9K bytes
    - Viewed (1)
  7. android-test/src/androidTest/java/okhttp/android/test/SingleAndroidTest.kt

      private var client: OkHttpClient =
        OkHttpClient
          .Builder()
          .sslSocketFactory(
            handshakeCertificates.sslSocketFactory(),
            handshakeCertificates.trustManager,
          ).connectionPool(ConnectionPool(0, 1, TimeUnit.SECONDS))
          .build()
    
      private val server =
        MockWebServer()
    
      @Test
      fun testHttpsRequest() {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Nov 21 12:33:41 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  8. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/ftp/FtpClient.java

                    if ("all".equals(trustManager)) {
                        ftpsClient.setTrustManager(TrustManagerUtils.getAcceptAllTrustManager());
                    } else if ("valid".equals(trustManager)) {
                        ftpsClient.setTrustManager(TrustManagerUtils.getValidateServerCertificateTrustManager());
                    } else if ("none".equals(trustManager)) {
                        ftpsClient.setTrustManager(null);
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Mon Nov 24 03:59:47 UTC 2025
    - 40K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

                ConnectionSpec.RESTRICTED_TLS,
                ConnectionSpec.MODERN_TLS,
              ),
            ).sslSocketFactory(
              suppressTlsFallbackClientSocketFactory(),
              handshakeCertificates.trustManager,
            ).build()
        executeSynchronously("/").assertBody("abc")
      }
    
      @Test
      fun recoverFromTlsHandshakeFailure_tlsFallbackScsvEnabled() {
        platform.assumeNotConscrypt()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 147.4K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

      @Test
      fun handshakeCertificates() {
        val handshakeCertificates = HandshakeCertificates.Builder().build()
        val keyManager: X509KeyManager = handshakeCertificates.keyManager
        val trustManager: X509TrustManager = handshakeCertificates.trustManager
        val sslSocketFactory: SSLSocketFactory = handshakeCertificates.sslSocketFactory()
        val sslContext: SSLContext = handshakeCertificates.sslContext()
      }
    
      @Test
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 47K bytes
    - Viewed (0)
Back to top