Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for platformTrustManager (0.13 sec)

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

         * this problem with [certificate pinning][CertificatePinner].
         */
        fun addPlatformTrustedCertificates() =
          apply {
            val platformTrustManager = Platform.get().platformTrustManager()
            Collections.addAll(trustedCertificates, *platformTrustManager.acceptedIssuers)
          }
    
        /**
         * Configures this to not authenticate the HTTPS server on to [hostname]. This makes the user
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/platform/OpenJSSEPlatform.kt

      // defaulted versions for TLS based on what is requested.
      override fun newSSLContext(): SSLContext = SSLContext.getInstance("TLSv1.3", provider)
    
      override fun platformTrustManager(): X509TrustManager {
        val factory =
          TrustManagerFactory.getInstance(
            TrustManagerFactory.getDefaultAlgorithm(),
            provider,
          )
        factory.init(null as KeyStore?)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt

        keyManagerFactory.init(KeyStoreBuilderParameters(builderList))
        val keyManager = keyManagerFactory.keyManagers[0] as X509ExtendedKeyManager
    
        val trustManager = Platform.get().platformTrustManager()
    
        val sslContext = SSLContext.getInstance("TLS")
        sslContext.init(arrayOf(keyManager), arrayOf(trustManager), SecureRandom())
    
        val client =
          OkHttpClient.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/platform/BouncyCastlePlatform.kt

      private val provider: Provider = BouncyCastleJsseProvider()
    
      override fun newSSLContext(): SSLContext = SSLContext.getInstance("TLS", provider)
    
      override fun platformTrustManager(): X509TrustManager {
        val factory =
          TrustManagerFactory.getInstance(
            "PKIX",
            BouncyCastleJsseProvider.PROVIDER_NAME,
          )
        factory.init(null as KeyStore?)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/ConscryptTest.kt

      private val client = clientTestRule.newClient()
    
      @BeforeEach fun setUp() {
        platform.assumeConscrypt()
      }
    
      @Test
      fun testTrustManager() {
        assertThat(Conscrypt.isConscrypt(Platform.get().platformTrustManager())).isTrue()
      }
    
      @Test
      @Disabled
      fun testMozilla() {
        assumeNetwork()
    
        val request = Request.Builder().url("https://mozilla.org/robots.txt").build()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt

      // for version differences
      override fun newSSLContext(): SSLContext =
        // supports TLSv1.3 by default (version api is >= 1.4.0)
        SSLContext.getInstance("TLS", provider)
    
      override fun platformTrustManager(): X509TrustManager {
        val trustManagers =
          TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()).apply {
            init(null as KeyStore?)
          }.trustManagers!!
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

     */
    open class Platform {
      /** Prefix used on custom headers. */
      fun getPrefix() = "OkHttp"
    
      open fun newSSLContext(): SSLContext = SSLContext.getInstance("TLS")
    
      open fun platformTrustManager(): X509TrustManager {
        val factory =
          TrustManagerFactory.getInstance(
            TrustManagerFactory.getDefaultAlgorithm(),
          )
        factory.init(null as KeyStore?)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CallHandshakeTest.kt

        platform.assumeNotConscrypt()
        platform.assumeNotBouncyCastle()
    
        val platform = Platform.get()
        val platformDefaultCipherSuites =
          platform.newSslSocketFactory(platform.platformTrustManager()).defaultCipherSuites
        val cipherSuites =
          ConnectionSpec.RESTRICTED_TLS.effectiveCipherSuites(platformDefaultCipherSuites)
    
        if (cipherSuites.contains(TLS_CHACHA20_POLY1305_SHA256.javaName)) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

            override fun connectFailed(
              uri: URI,
              socketAddress: SocketAddress,
              e: IOException,
            ) {}
          }
    
        val trustManager = get().platformTrustManager()
        val sslContext = get().newSSLContext()
        sslContext.init(null, null, null)
    
        // new client, may share all same fields but likely different connection pool
        assertNotSame(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

          this.certificatePinner =
            builder.certificatePinner
              .withCertificateChainCleaner(certificateChainCleaner!!)
        } else {
          this.x509TrustManager = Platform.get().platformTrustManager()
          this.sslSocketFactoryOrNull = Platform.get().newSslSocketFactory(x509TrustManager!!)
          this.certificateChainCleaner = CertificateChainCleaner.get(x509TrustManager!!)
          this.certificatePinner =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 04:21:33 UTC 2024
    - 52K bytes
    - Viewed (0)
Back to top