Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 67 for TrustManager (0.07 sec)

  1. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

          builder.callTimeout(callTimeout.toLong(), SECONDS)
        }
        if (allowInsecure) {
          val trustManager = createInsecureTrustManager()
          val sslSocketFactory = createInsecureSslSocketFactory(trustManager)
          builder.sslSocketFactory(sslSocketFactory, trustManager)
          builder.hostnameVerifier(createInsecureHostnameVerifier())
        }
        if (verbose) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt

          Conscrypt.getApplicationProtocol(sslSocket)
        } else {
          super.getSelectedProtocol(sslSocket)
        }
    
      override fun newSslSocketFactory(trustManager: X509TrustManager): SSLSocketFactory {
        return newSSLContext().apply {
          init(null, arrayOf<TrustManager>(trustManager), null)
        }.socketFactory
      }
    
      companion object {
        val isSupported: Boolean =
          try {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. docs/features/https.md

          init {
            val trustManager = trustManagerForCertificates(trustedCertificatesInputStream())
            val sslContext = SSLContext.getInstance("TLS")
            sslContext.init(null, arrayOf<TrustManager>(trustManager), null)
            val sslSocketFactory = sslContext.socketFactory
    
            client = OkHttpClient.Builder()
                .sslSocketFactory(sslSocketFactory, trustManager)
                .build()
          }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Dec 24 00:16:30 UTC 2022
    - 10.5K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

        val x509KeyManager = newKeyManager(keystoreType, heldCertificate, *intermediates)
        val trustManager =
          newTrustManager(
            keystoreType,
            emptyList(),
            emptyList(),
          )
        val sslContext = get().newSSLContext()
        sslContext.init(
          arrayOf<KeyManager>(x509KeyManager),
          arrayOf<TrustManager>(trustManager),
          SecureRandom(),
        )
        return sslContext.socketFactory
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  5. 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()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

          .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-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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Dec 17 15:34:10 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  9. container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt

            trustManagerFactory.init(keyStoreFactory.loadOrCreateKeyStore())
            val trustManager = trustManagerFactory.trustManagers.first() as X509TrustManager
    
            sslSocketFactory(socketFactory, trustManager)
          }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

          }
    
        val client =
          clientTestRule.newClientBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            )
            .dns(dns)
            .build()
    
        server.enqueue(MockResponse())
    
        val url = server.url("/").newBuilder().host("localhost.localdomain").build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top