Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for trustManager (0.07 sec)

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

          )
        factory.init(null as KeyStore?)
        val trustManagers = factory.trustManagers!!
        check(trustManagers.size == 1 && trustManagers[0] is X509TrustManager) {
          "Unexpected default trust managers: ${trustManagers.contentToString()}"
        }
        return trustManagers[0] as X509TrustManager
      }
    
      open fun trustManager(sslSocketFactory: SSLSocketFactory): X509TrustManager? {
        return 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-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt

        factory.init(trustStore)
        val result = factory.trustManagers!!
        check(result.size == 1 && result[0] is X509TrustManager) {
          "Unexpected trust managers: ${result.contentToString()}"
        }
    
        val trustManager = result[0] as X509TrustManager
    
        return when {
          insecureHosts.isEmpty() -> trustManager
          Platform.isAndroid -> InsecureAndroidTrustManager(trustManager, 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)
  4. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

        TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
        if (trustManagers.length != 1 || !(trustManagers[0] instanceof X509TrustManager)) {
          throw new IllegalStateException("Unexpected default trust managers:"
              + Arrays.toString(trustManagers));
        }
        return (X509TrustManager) trustManagers[0];
      }
    
      private String[] javaNames(List<CipherSuite> cipherSuites) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Mar 14 21:57:42 UTC 2019
    - 6.5K bytes
    - Viewed (0)
  5. 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)
  6. okhttp/src/main/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt

        val trustManagers =
          TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()).apply {
            init(null as KeyStore?)
          }.trustManagers!!
        check(trustManagers.size == 1 && trustManagers[0] is X509TrustManager) {
          "Unexpected default trust managers: ${trustManagers.contentToString()}"
        }
        val x509TrustManager = trustManagers[0] as X509TrustManager
    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/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)
  8. 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)
  9. 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)
  10. 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)
Back to top