Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for addTrustedCertificate (0.19 sec)

  1. okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

            .add(server.hostName, pin(goodIntermediateCa.certificate))
            .build()
        val handshakeCertificates =
          HandshakeCertificates.Builder()
            .addTrustedCertificate(rootCa.certificate)
            .addTrustedCertificate(compromisedRootCa.certificate)
            .build()
        val client =
          clientTestRule.newClientBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  2. okhttp-tls/api/okhttp-tls.api

    	public final fun addInsecureHost (Ljava/lang/String;)Lokhttp3/tls/HandshakeCertificates$Builder;
    	public final fun addPlatformTrustedCertificates ()Lokhttp3/tls/HandshakeCertificates$Builder;
    	public final fun addTrustedCertificate (Ljava/security/cert/X509Certificate;)Lokhttp3/tls/HandshakeCertificates$Builder;
    	public final fun build ()Lokhttp3/tls/HandshakeCertificates;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Feb 26 19:17:33 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt

        val certificates =
          HandshakeCertificates.Builder()
            .addTrustedCertificate(letsEncryptCertificateAuthority)
            .addTrustedCertificate(entrustRootCertificateAuthority)
            .addTrustedCertificate(comodoRsaCertificationAuthority)
            // Uncomment if standard certificates are also required.
            // .addPlatformTrustedCertificates()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  4. okhttp-tls/README.md

    to trust. In this simplified example we trust the server's self-signed certificate:
    
    ```java
    HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
        .addTrustedCertificate(localhostCertificate.certificate())
        .build();
    OkHttpClient client = new OkHttpClient.Builder()
        .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
        .build();
    ```
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Dec 17 15:34:10 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java

        HandshakeCertificates certificates = new HandshakeCertificates.Builder()
            .addTrustedCertificate(letsEncryptCertificateAuthority)
            .addTrustedCertificate(entrustRootCertificateAuthority)
            .addTrustedCertificate(comodoRsaCertificationAuthority)
            // Uncomment if standard certificates are also required.
            //.addPlatformTrustedCertificates()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Aug 12 07:26:27 UTC 2021
    - 9.3K bytes
    - Viewed (0)
  6. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

            .build()
        val server =
          HandshakeCertificates.Builder()
            .addTrustedCertificate(clientRoot.certificate)
            .heldCertificate(serverCertificate, serverIntermediate.certificate)
            .build()
        val client =
          HandshakeCertificates.Builder()
            .addTrustedCertificate(serverRoot.certificate)
            .heldCertificate(clientCertificate, clientIntermediate.certificate)
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

        server.useHttps(serverCertificates.sslSocketFactory(), false);
        server.enqueue(new MockResponse());
    
        HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
            .addTrustedCertificate(localhostCertificate.certificate())
            .build();
        OkHttpClient client = new OkHttpClient.Builder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 02 14:04:37 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  8. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

            .addSubjectAlternativeName("url-host.com")
            .build()
        val handshakeCertificates =
          HandshakeCertificates.Builder()
            .heldCertificate(heldCertificate)
            .addTrustedCertificate(heldCertificate.certificate)
            .build()
        server.useHttps(handshakeCertificates.sslSocketFactory())
    
        val dns =
          Dns {
            Dns.SYSTEM.lookup(server.hostName)
          }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt

            .addSubjectAlternativeName("localhost.localdomain")
            .build()
        return@lazy HandshakeCertificates.Builder()
          .heldCertificate(heldCertificate)
          .addTrustedCertificate(heldCertificate.certificate)
          .build()
      }
    
      /** Returns an SSL client for this host's localhost address. */
      @JvmStatic
      fun localhost(): HandshakeCertificates = localhost
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. android-test/src/androidTest/java/okhttp/android/test/letsencrypt/LetsEncryptClientTest.kt

          val handshakeCertificates =
            HandshakeCertificates.Builder()
              // TODO reenable in official answers
    //      .addPlatformTrustedCertificates()
              .addTrustedCertificate(cert)
              .build()
    
          clientBuilder
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            )
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.4K bytes
    - Viewed (0)
Back to top