Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 67 for TrustManager (0.04 sec)

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

    ) : AndroidSocketAdapter(sslSocketClass) {
      override fun matchesSocketFactory(sslSocketFactory: SSLSocketFactory): Boolean = sslSocketFactoryClass.isInstance(sslSocketFactory)
    
      override fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager? {
        val context: Any? =
          readFieldOrNull(
            sslSocketFactory,
            paramClass,
            "sslParameters",
          )
        val x509TrustManager =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

          .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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

        val trustManager = RecordingTrustManager(handshakeCertificates.trustManager)
        val sslContext = get().newSSLContext()
        sslContext.init(null, arrayOf<TrustManager>(trustManager), null)
        client =
          client
            .newBuilder()
            .hostnameVerifier(hostnameVerifier)
            .sslSocketFactory(sslContext.socketFactory, trustManager)
            .build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
  4. 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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  5. 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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 6K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

      fun handshakeCertificates() {
        val handshakeCertificates = HandshakeCertificates.Builder().build()
        val keyManager: X509KeyManager = handshakeCertificates.keyManager()
        val trustManager: X509TrustManager = handshakeCertificates.trustManager()
      }
    
      @Test @Disabled
      fun handshakeCertificatesBuilder() {
        var builder: HandshakeCertificates.Builder = HandshakeCertificates.Builder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/OpenJSSETest.kt

            .build()
    
        client =
          client
            .newBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            ).build()
        server.useHttps(handshakeCertificates.sslSocketFactory())
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  8. okhttp-tls/api/okhttp-tls.api

    	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 {
    	public fun <init> ()V
    	public final fun addInsecureHost (Ljava/lang/String;)Lokhttp3/tls/HandshakeCertificates$Builder;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Feb 26 19:17:33 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  9. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/SocketAdapter.kt

    import javax.net.ssl.SSLSocket
    import javax.net.ssl.SSLSocketFactory
    import javax.net.ssl.X509TrustManager
    import okhttp3.Protocol
    
    interface SocketAdapter {
      fun isSupported(): Boolean
    
      fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager? = null
    
      fun matchesSocket(sslSocket: SSLSocket): Boolean
    
      fun matchesSocketFactory(sslSocketFactory: SSLSocketFactory): Boolean = false
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

            .addTrustedCertificate(localhostCertificate.certificate())
            .build();
        OkHttpClient client = new OkHttpClient.Builder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
            .build();
    
        Call call = client.newCall(new Request.Builder()
            .url(server.url("/"))
            .build());
        Response response = call.execute();
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 02 14:04:37 UTC 2023
    - 2.1K bytes
    - Viewed (0)
Back to top