Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for Certificates (0.11 sec)

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

        throw IllegalArgumentException("failed to decode certificate", nsee)
      } catch (iae: IllegalArgumentException) {
        throw IllegalArgumentException("failed to decode certificate", iae)
      } catch (e: GeneralSecurityException) {
        throw IllegalArgumentException("failed to decode certificate", e)
      }
    }
    
    /**
     * Returns the certificate encoded in [PEM format][rfc_7468].
     *
     * [rfc_7468]: https://tools.ietf.org/html/rfc7468
     */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

        val data = CertificateAdapters.certificate.toDer(this)
        try {
          val certificateFactory = CertificateFactory.getInstance("X.509")
          val certificates = certificateFactory.generateCertificates(Buffer().write(data).inputStream())
          return certificates.single() as X509Certificate
        } catch (e: NoSuchElementException) {
          throw IllegalArgumentException("failed to decode certificate", e)
        } catch (e: IllegalArgumentException) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

     *
     *  * The client's handshake certificates must have a [held certificate][HeldCertificate] (a
     *    certificate and its private key). The client must also have a (possibly-empty) chain of
     *    intermediate certificates to establish trust from a root certificate to the client's
     *    certificate. The root certificate is not included in this chain.
     *  * The server's handshake certificates must include a set of trusted root certificates. They
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/CertificateChainCleanerTest.kt

        assertThat(cleaner.clean(certificates, "hostname")).isEqualTo(certificates)
        assertThat(cleaner.clean(certificates.subList(0, 9), "hostname")).isEqualTo(
          certificates,
        )
      }
    
      @Test
      fun chainTooLong() {
        val heldCertificates = chainOfLength(11)
        val certificates: MutableList<Certificate> = ArrayList()
        for (heldCertificate in heldCertificates) {
          certificates.add(heldCertificate.certificate)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 9.5K bytes
    - Viewed (1)
  5. okhttp-tls/README.md

    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
    int specifies how many intermediate certificates are allowed beneath it in the chain.
    
    ```java
    HeldCertificate rootCertificate = new HeldCertificate.Builder()
        .certificateAuthority(1)
        .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. samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java

            .addTrustedCertificate(comodoRsaCertificationAuthority)
            // Uncomment if standard certificates are also required.
            //.addPlatformTrustedCertificates()
            .build();
    
        client = new OkHttpClient.Builder()
                .sslSocketFactory(certificates.sslSocketFactory(), certificates.trustManager())
                .build();
      }
    
      public void run() throws Exception {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 12 07:26:27 UTC 2021
    - 9.3K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/FakeSSLSession.kt

     * the License.
     */
    package okhttp3
    
    import java.security.Principal
    import java.security.cert.Certificate
    import javax.net.ssl.SSLPeerUnverifiedException
    import javax.net.ssl.SSLSession
    import javax.net.ssl.SSLSessionContext
    import javax.security.cert.X509Certificate
    
    class FakeSSLSession(
      vararg val certificates: Certificate,
    ) : SSLSession {
      override fun getApplicationBufferSize(): Int = throw UnsupportedOperationException()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt

            .addTrustedCertificate(comodoRsaCertificationAuthority)
            // Uncomment if standard certificates are also required.
            // .addPlatformTrustedCertificates()
            .build()
        client =
          OkHttpClient
            .Builder()
            .sslSocketFactory(certificates.sslSocketFactory(), certificates.trustManager)
            .build()
      }
    
      fun run() {
        showUrl("https://squareup.com/robots.txt")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/tls/CertificateChainCleaner.kt

     * 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 {
      @Throws(SSLPeerUnverifiedException::class)
      abstract fun clean(
        chain: List<Certificate>,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2K bytes
    - Viewed (0)
  10. regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java

                  "emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=\n" +
                  "-----END CERTIFICATE-----";
    
          CertificateFactory cf = CertificateFactory.getInstance("X.509");
          Certificate isgCertificate = cf.generateCertificate(new ByteArrayInputStream(isgCert.getBytes("UTF-8")));
    
          HandshakeCertificates certificates = new HandshakeCertificates.Builder()
                  .addTrustedCertificate((X509Certificate) isgCertificate)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Nov 17 07:40:31 UTC 2020
    - 6.1K bytes
    - Viewed (0)
Back to top