Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for addSubjectAlternativeName (0.25 sec)

  1. okhttp/src/jvmTest/kotlin/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  2. 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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 19:32:33 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

      }
    
      @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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 22.6K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt

        val heldCertificate =
          HeldCertificate
            .Builder()
            .commonName("localhost")
            .addSubjectAlternativeName("localhost")
            .addSubjectAlternativeName("localhost.localdomain")
            .build()
        return@lazy HandshakeCertificates
          .Builder()
          .heldCertificate(heldCertificate)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.3K bytes
    - Viewed (1)
  5. 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)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/HostnameVerifierTest.kt

        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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 40.4K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt

            .Builder()
            .signedBy(rootCa)
            .serialNumber(2L)
            .commonName(server.hostName)
            .addSubjectAlternativeName(server.hostName)
            .addSubjectAlternativeName("san.com")
            .addSubjectAlternativeName("*.wildcard.com")
            .addSubjectAlternativeName("differentdns.com")
            .build()
        serverIps = Dns.SYSTEM.lookup(server.hostName)
        dns[server.hostName] = serverIps
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jun 19 11:44:16 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/OpenJSSETest.kt

        // can't use TlsUtil.localhost with a non OpenJSSE trust manager
        val heldCertificate =
          HeldCertificate
            .Builder()
            .commonName("localhost")
            .addSubjectAlternativeName("localhost")
            .build()
        val handshakeCertificates =
          HandshakeCertificates
            .Builder()
            .heldCertificate(heldCertificate)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  9. 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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 02 14:04:37 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt

      }
    
      @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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 4.2K bytes
    - Viewed (0)
Back to top