Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for Trusted (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/tls/TrustRootIndex.kt

     * limitations under the License.
     */
    package okhttp3.internal.tls
    
    import java.security.cert.X509Certificate
    
    fun interface TrustRootIndex {
      /** Returns the trusted CA certificate that signed [cert]. */
      fun findByIssuerAndSignature(cert: X509Certificate): X509Certificate?
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 843 bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/tls/BasicTrustRootIndex.kt

     * limitations under the License.
     */
    package okhttp3.internal.tls
    
    import java.security.cert.X509Certificate
    import javax.security.auth.x500.X500Principal
    
    /** A simple index that of trusted root certificates that have been loaded into memory. */
    class BasicTrustRootIndex(vararg caCerts: X509Certificate) : TrustRootIndex {
      private val subjectToCaCerts: Map<X500Principal, Set<X509Certificate>>
    
      init {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/CheckHandshake.java

    import okhttp3.CertificatePinner;
    import okhttp3.Interceptor;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    
    public final class CheckHandshake {
      /** Rejects otherwise-trusted certificates. */
      private static final Interceptor CHECK_HANDSHAKE_INTERCEPTOR = new Interceptor() {
        final Set<String> denylist = Collections.singleton(
            "sha256/afwiKY3RxoMmLkuRW1l7QsPZTJPwDS2pdDROQjXw8ig=");
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/JsseDebugLogging.kt

        enum class Type {
          Handshake,
          Plaintext,
          Encrypted,
          Setup,
          Unknown,
        }
    
        val type: Type
          get() =
            when {
              message == "adding as trusted certificates" -> Type.Setup
              message == "Raw read" || message == "Raw write" -> Type.Encrypted
              message == "Plaintext before ENCRYPTION" || message == "Plaintext after DECRYPTION" -> Type.Plaintext
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  5. okhttp-tls/README.md

    -----------------------
    
    The above example uses a self-signed certificate. This is convenient for testing but not
    representative of real-world HTTPS deployment. To get closer to that we can use `HeldCertificate`
    to generate a trusted root certificate, an intermediate certificate, and a server certificate.
    We use `certificateAuthority(int)` to create certificates that can sign other certificates. The
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 9.1K bytes
    - Viewed (1)
  6. okhttp/src/main/kotlin/okhttp3/internal/tls/BasicCertificateChainCleaner.kt

          val toVerify = result[result.size - 1] as X509Certificate
    
          // If this cert has been signed by a trusted cert, use that. Add the trusted certificate to
          // the end of the chain unless it's already present. (That would happen if the first
          // certificate in the chain is itself a self-signed and trusted CA certificate.)
          val trustedCert = trustRootIndex.findByIssuerAndSignature(toVerify)
          if (trustedCert != null) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

        /**
         * Configure the certificate chain to use when being authenticated. The first certificate is
         * the held certificate, further certificates are included in the handshake so the peer can
         * build a trusted path to a trusted root certificate.
         *
         * The chain should include all intermediate certificates but does not need the root certificate
         * that we expect to be known by the remote peer. The peer already has that certificate so
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.5K bytes
    - Viewed (1)
  8. okhttp/src/test/java/okhttp3/CertificateChainCleanerTest.kt

            selfSigned.certificate,
            trusted.certificate,
          )
        assertThat(cleaner.clean(list(certB, certA), "hostname")).isEqualTo(
          list(certB, certA, trusted, selfSigned),
        )
        assertThat(cleaner.clean(list(certB, certA, trusted), "hostname")).isEqualTo(
          list(certB, certA, trusted, selfSigned),
        )
        assertThat(cleaner.clean(list(certB, certA, trusted, selfSigned), "hostname"))
          .isEqualTo(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/tls/CertificateChainCleaner.kt

     * certificate is signed by the certificate that follows, and the last certificate is a trusted CA
     * certificate.
     *
     * Use of the chain cleaner is necessary to omit unexpected certificates that aren't relevant to
     * the TLS handshake and to extract the trusted CA certificate for the benefit of certificate
     * pinning.
     */
    abstract class CertificateChainCleaner {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/platform/AndroidPlatform.kt

       *
       * This class exploits knowledge of Android implementation details. This class is potentially
       * much faster to initialize than [BasicTrustRootIndex] because it doesn't need to load and
       * index trusted CA certificates.
       */
      internal data class CustomTrustRootIndex(
        private val trustManager: X509TrustManager,
        private val findByIssuerAndSignatureMethod: Method,
      ) : TrustRootIndex {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.2K bytes
    - Viewed (0)
Back to top