Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for CERTIFICATE (0.04 sec)

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

     * ```
     *
     * In this example the HTTP client already knows and trusts the last certificate, "Entrust Root
     * Certification Authority - G2". That certificate is used to verify the signature of the
     * intermediate certificate, "Entrust Certification Authority - L1M". The intermediate certificate
     * is used to verify the signature of the "www.squareup.com" certificate.
     *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 21.6K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/CertificateChainCleanerTest.kt

            .serialNumber(1L)
            .build()
        val rootB =
          HeldCertificate
            .Builder()
            .serialNumber(2L)
            .build()
        assertThat(get(rootB.certificate, rootA.certificate))
          .isEqualTo(get(rootA.certificate, rootB.certificate))
      }
    
      @Test
      fun equalsFromTrustManager() {
        val handshakeCertificates = HandshakeCertificates.Builder().build()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 9.5K bytes
    - Viewed (1)
  3. okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerTest.kt

        }
    
        // Should not be pinned:
        certificatePinner.check("uk", listOf(certB1.certificate))
        certificatePinner.check("co.uk", listOf(certB1.certificate))
        certificatePinner.check("anotherexample.co.uk", listOf(certB1.certificate))
        certificatePinner.check("foo.anotherexample.co.uk", listOf(certB1.certificate))
      }
    
      @Test
      fun testBadPin() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/tls/OkHostnameVerifier.kt

          }
        }
    
      fun verify(
        host: String,
        certificate: X509Certificate,
      ): Boolean =
        when {
          host.canParseAsIpAddress() -> verifyIpAddress(host, certificate)
          else -> verifyHostname(host, certificate)
        }
    
      /** Returns true if [certificate] matches [ipAddress]. */
      private fun verifyIpAddress(
        ipAddress: String,
        certificate: X509Certificate,
      ): Boolean {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  5. okhttp-tls/README.md

        .heldCertificate(serverCertificate, intermediateCertificate.certificate())
        .build();
    ```
    
    The client only needs to know the trusted root certificate. It checks the server's certificate by
    validating the signatures within the chain.
    
    ```java
    HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
        .addTrustedCertificate(rootCertificate.certificate())
        .build();
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 19:32:33 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

     *
     *  * The server's handshake certificates must have a [held certificate][HeldCertificate] (a
     *    certificate and its private key). The certificate's subject alternative names must match the
     *    server's hostname. The server must also have is a (possibly-empty) chain of intermediate
     *    certificates to establish trust from a root certificate to the server's certificate. The root
     *    certificate is not included in this chain.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  7. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt

        val certificate =
          HeldCertificate
            .Builder()
            .keyPair(publicKey, privateKey)
            .build()
    
        val certificateByteString = certificate.certificate.encoded.toByteString()
    
        val okHttpCertificate =
          CertificateAdapters.certificate
            .fromDer(certificateByteString)
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 43.9K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/HostnameVerifierTest.kt

      }
    
      private fun certificate(certificate: String): X509Certificate =
        CertificateFactory
          .getInstance("X.509")
          .generateCertificate(ByteArrayInputStream(certificate.toByteArray()))
          as X509Certificate
    
      private fun session(certificate: String): SSLSession = FakeSSLSession(certificate(certificate))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 40.4K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

        // Add a bad intermediate CA and have that issue a rogue certificate for localhost. Prepare
        // an SSL context for an attacking webserver. It includes both these rogue certificates plus the
        // trusted good certificate above. The attack is that by including the good certificate in the
        // chain, we may trick the certificate pinner into accepting the rouge certificate.
        val compromisedIntermediateCa =
          HeldCertificate
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 24.3K bytes
    - Viewed (1)
  10. okhttp/src/jvmTest/kotlin/okhttp3/HandshakeTest.kt

            peerCertificates = listOf(serverCertificate.certificate, serverIntermediate.certificate),
            localCertificates = listOf(),
          )
    
        assertThat(handshake.tlsVersion).isEqualTo(TlsVersion.TLS_1_3)
        assertThat(handshake.cipherSuite).isEqualTo(CipherSuite.TLS_AES_128_GCM_SHA256)
        assertThat(handshake.peerCertificates).containsExactly(
          serverCertificate.certificate,
          serverIntermediate.certificate,
        )
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.2K bytes
    - Viewed (0)
Back to top