Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 9 of 9 for addPlatformTrustedCertificates (0.13 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt

        server.useHttps(serverCertificates.sslSocketFactory())
        server.enqueue(MockResponse())
    
        val clientCertificates =
          HandshakeCertificates
            .Builder()
            .addPlatformTrustedCertificates()
            .addInsecureHost(server.hostName)
            .build()
    
        val client =
          clientTestRule
            .newClientBuilder()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt

              .setHeader("Location", "https://www.google.com/robots.txt"),
          )
        }
    
      val clientCertificates =
        HandshakeCertificates
          .Builder()
          .addPlatformTrustedCertificates()
          .addInsecureHost(server.hostName)
          .build()
    
      val client =
        OkHttpClient
          .Builder()
          .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 1.9K bytes
    - Click Count (0)
  3. okhttp-tls/api/okhttp-tls.api

    }
    
    public final class okhttp3/tls/HandshakeCertificates$Builder {
    	public fun <init> ()V
    	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;
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat Feb 26 19:17:33 GMT 2022
    - 3.7K bytes
    - Click Count (0)
  4. okhttp-tls/README.md

    This is the behavior you'll get with your OkHttpClient if you don't specifically configure
    `HandshakeCertificates`. Or you can do it explicitly with `addPlatformTrustedCertificates()`:
    
    ```java
    HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
        .addPlatformTrustedCertificates()
        .build();
    OkHttpClient client = new OkHttpClient.Builder()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Thu Oct 30 21:39:59 GMT 2025
    - 9.1K bytes
    - Click Count (0)
  5. samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java

            .addTrustedCertificate(entrustRootCertificateAuthority)
            .addTrustedCertificate(comodoRsaCertificationAuthority)
            // Uncomment if standard certificates are also required.
            //.addPlatformTrustedCertificates()
            .build();
    
        client = new OkHttpClient.Builder()
                .sslSocketFactory(certificates.sslSocketFactory(), certificates.trustManager())
                .build();
      }
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 9.3K bytes
    - Click Count (0)
  6. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

            throw TestAbortedException("Google Play Services not available", gpsnae)
          }
    
          val clientCertificates =
            HandshakeCertificates
              .Builder()
              .addPlatformTrustedCertificates()
              .addInsecureHost(server.hostName)
              .build()
    
          // Need fresh client to reset sslSocketFactoryOrNull
          client =
            OkHttpClient
              .Builder()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 29.9K bytes
    - Click Count (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

         * certificates. Applications that connect to a known set of servers may be able to mitigate
         * this problem with [certificate pinning][CertificatePinner].
         */
        fun addPlatformTrustedCertificates() =
          apply {
            val platformTrustManager = Platform.get().platformTrustManager()
            Collections.addAll(trustedCertificates, *platformTrustManager.acceptedIssuers)
          }
    
        /**
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat May 10 11:15:14 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        builder = builder.heldCertificate(heldCertificate, heldCertificate.certificate)
        builder = builder.addTrustedCertificate(heldCertificate.certificate)
        builder = builder.addPlatformTrustedCertificates()
        val handshakeCertificates: HandshakeCertificates = builder.build()
      }
    
      @Test
      fun heldCertificate() {
        val heldCertificate: HeldCertificate = HeldCertificate.Builder().build()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Nov 05 18:28:35 GMT 2025
    - 47K bytes
    - Click Count (0)
  9. docs/changelogs/changelog_4x.md

        [our DevServer sample][dev_server]:
    
        ```kotlin
        val clientCertificates = HandshakeCertificates.Builder()
            .addPlatformTrustedCertificates()
            .addInsecureHost("localhost")
            .build()
    
        val client = OkHttpClient.Builder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Click Count (0)
Back to Top