Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for TrustManager (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

      }
    
      open fun buildCertificateChainCleaner(trustManager: X509TrustManager): CertificateChainCleaner =
        BasicCertificateChainCleaner(buildTrustRootIndex(trustManager))
    
      open fun buildTrustRootIndex(trustManager: X509TrustManager): TrustRootIndex = BasicTrustRootIndex(*trustManager.acceptedIssuers)
    
      open fun newSslSocketFactory(trustManager: X509TrustManager): SSLSocketFactory {
        try {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/platform/AndroidPlatform.kt

          else -> true
        }
    
      override fun buildCertificateChainCleaner(trustManager: X509TrustManager): CertificateChainCleaner =
        AndroidCertificateChainCleaner.buildIfSupported(trustManager) ?: super.buildCertificateChainCleaner(trustManager)
    
      override fun buildTrustRootIndex(trustManager: X509TrustManager): TrustRootIndex =
        try {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/InsecureForHostTest.kt

            .addInsecureHost(server.hostName)
            .build()
    
        val client =
          clientTestRule.newClientBuilder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
            .build()
    
        val call = client.newCall(Request(server.url("/")))
        val response = call.execute()
        assertThat(response.code).isEqualTo(200)
        assertThat(response.handshake!!.cipherSuite).isNotNull()
    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-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt

          "Unexpected trust managers: ${result.contentToString()}"
        }
    
        val trustManager = result[0] as X509TrustManager
    
        return when {
          insecureHosts.isEmpty() -> trustManager
          Platform.isAndroid -> InsecureAndroidTrustManager(trustManager, insecureHosts)
          else -> InsecureExtendedTrustManager(trustManager as X509ExtendedTrustManager, insecureHosts)
        }
      }
    
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidCertificateChainCleaner.kt

        other is AndroidCertificateChainCleaner &&
          other.trustManager === this.trustManager
    
      override fun hashCode(): Int = System.identityHashCode(trustManager)
    
      companion object {
        @SuppressSignatureCheck
        fun buildIfSupported(trustManager: X509TrustManager): AndroidCertificateChainCleaner? {
          val extensions =
            try {
              X509TrustManagerExtensions(trustManager)
            } catch (iae: IllegalArgumentException) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

            .connectionSpecs(Collections.singletonList(spec))
            .sslSocketFactory(customSslSocketFactory, trustManager)
            .build();
      }
    
      /**
       * Returns the VM's default SSL socket factory, using {@code trustManager} for trusted root
       * certificates.
       */
      private SSLSocketFactory defaultSslSocketFactory(X509TrustManager trustManager)
          throws NoSuchAlgorithmException, KeyManagementException {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Mar 14 21:57:42 UTC 2019
    - 6.5K bytes
    - Viewed (0)
  7. okhttp/src/main/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

        replaceWith = ReplaceWith(expression = "trustManager"),
        level = DeprecationLevel.ERROR,
      )
      fun trustManager(): X509TrustManager = trustManager
    
      fun sslSocketFactory(): SSLSocketFactory = sslContext().socketFactory
    
      fun sslContext(): SSLContext {
        return Platform.get().newSSLContext().apply {
          init(arrayOf<KeyManager>(keyManager), arrayOf<TrustManager>(trustManager), SecureRandom())
        }
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/platform/Android10Platform.kt

        NetworkSecurityPolicy.getInstance().isCleartextTrafficPermitted(hostname)
    
      override fun buildCertificateChainCleaner(trustManager: X509TrustManager): CertificateChainCleaner =
        AndroidCertificateChainCleaner.buildIfSupported(trustManager) ?: super.buildCertificateChainCleaner(trustManager)
    
      companion object {
        val isSupported: Boolean = isAndroid && Build.VERSION.SDK_INT >= 29
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  10. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        val sslContext =
          Platform.get().newSSLContext().apply {
            init(null, arrayOf(trustManager), null)
          }
        val sslSocketFactory = sslContext.socketFactory
    
        val hostnameVerifier = HostnameVerifier { _, _ -> true }
    
        client =
          client.newBuilder()
            .sslSocketFactory(sslSocketFactory, trustManager)
            .hostnameVerifier(hostnameVerifier)
            .build()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 27K bytes
    - Viewed (0)
Back to top