Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for newTrustManager (0.16 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

    import okhttp3.CertificatePinner
    import okhttp3.internal.platform.Platform
    import okhttp3.internal.toImmutableList
    import okhttp3.tls.internal.TlsUtil.newKeyManager
    import okhttp3.tls.internal.TlsUtil.newTrustManager
    
    /**
     * Certificates to identify which peers to trust and also to earn the trust of those peers in kind.
     * Client and server exchange these certificates during the handshake phase of a TLS connection.
     *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt

      val clientTestRule = OkHttpClientTestRule()
    
      @StartStop
      private val server = MockWebServer()
    
      @BeforeEach
      fun setup() {
        // BCX509ExtendedTrustManager not supported in TlsUtil.newTrustManager
        platform.assumeNotBouncyCastle()
      }
    
      @Test fun `untrusted host in insecureHosts connects successfully`() {
        val serverCertificates = platform.localhostHandshakeCertificates()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt

      @JvmStatic
      fun localhost(): HandshakeCertificates = localhost
    
      /** Returns a trust manager that trusts `trustedCertificates`. */
      @JvmStatic @IgnoreJRERequirement
      fun newTrustManager(
        keyStoreType: String?,
        trustedCertificates: List<X509Certificate>,
        insecureHosts: List<String>,
      ): X509TrustManager {
        val trustStore = newEmptyKeyStore(keyStoreType)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.3K bytes
    - Viewed (1)
Back to top