Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 30 for heldCertificates (0.07 seconds)

  1. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

        val heldCertificate: HeldCertificate = HeldCertificate.Builder().build()
        builder = builder.heldCertificate(heldCertificate, heldCertificate.certificate())
        builder = builder.addTrustedCertificate(heldCertificate.certificate())
      }
    
      @Test @Disabled
      fun heldCertificate() {
        val heldCertificate: HeldCertificate = HeldCertificate.Builder().build()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 13.3K bytes
    - Click Count (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt

         * transmitting it is unnecessary.
         */
        fun heldCertificate(
          heldCertificate: HeldCertificate,
          vararg intermediates: X509Certificate,
        ) = apply {
          this.heldCertificate = heldCertificate
          this.intermediates = arrayOf(*intermediates) // Defensive copy.
        }
    
        /**
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat May 10 11:15:14 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/OpenJSSETest.kt

        val heldCertificate =
          HeldCertificate
            .Builder()
            .commonName("localhost")
            .addSubjectAlternativeName("localhost")
            .build()
        val handshakeCertificates =
          HandshakeCertificates
            .Builder()
            .heldCertificate(heldCertificate)
            .addTrustedCertificate(heldCertificate.certificate)
            .build()
    
        client =
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 3.7K bytes
    - Click Count (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

      @Test
      fun heldCertificate() {
        val heldCertificate: HeldCertificate = HeldCertificate.Builder().build()
        val certificate: X509Certificate = heldCertificate.certificate
        val keyPair: KeyPair = heldCertificate.keyPair
        val certificatePem: String = heldCertificate.certificatePem()
        val privateKeyPkcs8Pem: String = heldCertificate.privateKeyPkcs8Pem()
        val privateKeyPkcs1Pem: String = heldCertificate.privateKeyPkcs1Pem()
      }
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Nov 05 18:28:35 GMT 2025
    - 47K bytes
    - Click Count (0)
  5. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

    import okhttp3.mockwebserver.MockWebServer;
    import okhttp3.tls.HandshakeCertificates;
    import okhttp3.tls.HeldCertificate;
    
    /**
     * Create an HTTPS server with a self-signed certificate that OkHttp trusts.
     */
    public class HttpsServer {
      public void run() throws Exception {
        HeldCertificate localhostCertificate = new HeldCertificate.Builder()
            .addSubjectAlternativeName("localhost")
            .build();
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Mon Jan 02 14:04:37 GMT 2023
    - 2.1K bytes
    - Click Count (0)
  6. 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()
        server.useHttps(serverCertificates.sslSocketFactory())
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/SocketChannelTest.kt

          val heldCertificate =
            HeldCertificate
              .Builder()
              .commonName(hostname)
              .addSubjectAlternativeName(hostname)
              .build()
          HandshakeCertificates
            .Builder()
            .heldCertificate(heldCertificate)
            .addTrustedCertificate(heldCertificate.certificate)
            .build()
        }
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat Nov 01 12:18:11 GMT 2025
    - 7.9K bytes
    - Click Count (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/HandshakeTest.kt

    import kotlin.test.assertFailsWith
    import okhttp3.Handshake.Companion.handshake
    import okhttp3.tls.HeldCertificate
    import org.junit.jupiter.api.Test
    
    class HandshakeTest {
      val serverRoot =
        HeldCertificate
          .Builder()
          .certificateAuthority(1)
          .build()
      val serverIntermediate =
        HeldCertificate
          .Builder()
          .certificateAuthority(0)
          .signedBy(serverRoot)
          .build()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerKotlinTest.kt

      }
    
      companion object {
        internal var certA1: HeldCertificate =
          HeldCertificate
            .Builder()
            .serialNumber(100L)
            .build()
        internal var certA1Sha256Pin = CertificatePinner.pin(certA1.certificate)
    
        private var certB1 =
          HeldCertificate
            .Builder()
            .serialNumber(200L)
            .build()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 8.2K bytes
    - Click Count (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerTest.kt

      companion object {
        val certA1 =
          HeldCertificate
            .Builder()
            .serialNumber(100L)
            .build()
        val certA1Sha256Pin = pin(certA1.certificate)
        val certB1 =
          HeldCertificate
            .Builder()
            .serialNumber(200L)
            .build()
        val certB1Sha256Pin = pin(certB1.certificate)
        val certC1 =
          HeldCertificate
            .Builder()
            .serialNumber(300L)
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 10.1K bytes
    - Click Count (0)
Back to Top