Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for addSubjectAlternativeName (0.17 sec)

  1. okhttp-tls/README.md

    [builder][held_certificate_builder] to create a self-signed certificate that a test server can use
    for HTTPS:
    
    ```java
    HeldCertificate localhostCertificate = new HeldCertificate.Builder()
        .addSubjectAlternativeName("localhost")
        .build();
    ```
    
    [`HandshakeCertificates`][handshake_certificates] keeps the certificates for a TLS handshake.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Dec 17 15:34:10 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt

            .certificateAuthority(1)
            .commonName("root")
            .addSubjectAlternativeName("root_ca.com")
            .build()
        serverIntermediateCa =
          HeldCertificate.Builder()
            .signedBy(serverRootCa)
            .certificateAuthority(0)
            .serialNumber(2L)
            .commonName("intermediate_ca")
            .addSubjectAlternativeName("intermediate_ca.com")
            .build()
        serverCert =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt

        // Generate a self-signed cert for the server to serve and the client to trust.
        val heldCertificate =
          HeldCertificate.Builder()
            .commonName("localhost")
            .addSubjectAlternativeName("localhost")
            .addSubjectAlternativeName("localhost.localdomain")
            .build()
        return@lazy HandshakeCertificates.Builder()
          .heldCertificate(heldCertificate)
          .addTrustedCertificate(heldCertificate.certificate)
    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. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

          .isCloseTo(now.toDouble() + durationMillis, deltaMillis)
      }
    
      @Test
      fun subjectAlternativeNames() {
        val heldCertificate =
          HeldCertificate.Builder()
            .addSubjectAlternativeName("1.1.1.1")
            .addSubjectAlternativeName("cash.app")
            .build()
        val certificate = heldCertificate.certificate
        assertThat(certificate.subjectAlternativeNames.toList()).containsExactly(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/InsecureForHostTest.kt

        assertThat(response.handshake!!.peerPrincipal).isNull()
      }
    
      @Test fun `bad certificates host in insecureHosts fails with SSLException`() {
        val heldCertificate =
          HeldCertificate.Builder()
            .addSubjectAlternativeName("example.com")
            .build()
        val serverCertificates =
          HandshakeCertificates.Builder()
            .heldCertificate(heldCertificate)
            .build()
    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/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt

        // https://www.gosecure.net/blog/2020/10/27/weakness-in-java-tls-host-verification/
        val heldCertificate =
          HeldCertificate.Builder()
            .commonName("Foo Corp")
            .addSubjectAlternativeName("k.com")
            .addSubjectAlternativeName("tel.com")
            .build()
        val session = session(heldCertificate.certificatePem())
        assertThat(verifier.verify("foo.com", session)).isFalse()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 40.3K bytes
    - Viewed (0)
  7. okhttp-tls/api/okhttp-tls.api

    }
    
    public final class okhttp3/tls/HeldCertificate$Builder {
    	public static final field Companion Lokhttp3/tls/HeldCertificate$Builder$Companion;
    	public fun <init> ()V
    	public final fun addSubjectAlternativeName (Ljava/lang/String;)Lokhttp3/tls/HeldCertificate$Builder;
    	public final fun build ()Lokhttp3/tls/HeldCertificate;
    	public final fun certificateAuthority (I)Lokhttp3/tls/HeldCertificate$Builder;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Feb 26 19:17:33 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

     */
    public class HttpsServer {
      public void run() throws Exception {
        HeldCertificate localhostCertificate = new HeldCertificate.Builder()
            .addSubjectAlternativeName("localhost")
            .build();
    
        HandshakeCertificates serverCertificates = new HandshakeCertificates.Builder()
            .heldCertificate(localhostCertificate)
            .build();
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 02 14:04:37 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

       * Host header).
       */
      @Test
      fun domainFronting() {
        val heldCertificate =
          HeldCertificate.Builder()
            .commonName("server name")
            .addSubjectAlternativeName("url-host.com")
            .build()
        val handshakeCertificates =
          HandshakeCertificates.Builder()
            .heldCertificate(heldCertificate)
            .addTrustedCertificate(heldCertificate.certificate)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

            .commonName("attacker")
            .addSubjectAlternativeName("attacker.com")
            .signedBy(pinnedIntermediate)
            .build()
        val phonyVictim =
          HeldCertificate.Builder()
            .serialNumber(6L)
            .signedBy(attackerSwitch)
            .addSubjectAlternativeName("victim.com")
            .commonName("victim")
            .build()
        val certificatePinner =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.8K bytes
    - Viewed (0)
Back to top