Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 9 of 9 for heldCertificate (0.1 seconds)

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

     * a chain of certificates. The server uses a set of trusted root certificates to authenticate the
     * client. Subject alternative names are not used for client authentication.
     */
    @Suppress("DEPRECATION")
    class HeldCertificate(
      @get:JvmName("keyPair") val keyPair: KeyPair,
      @get:JvmName("certificate") val certificate: X509Certificate,
    ) {
      @JvmName("-deprecated_certificate")
      @Deprecated(
        message = "moved to val",
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 21.6K bytes
    - Click Count (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt

      private val server = MockWebServer()
    
      private lateinit var serverRootCa: HeldCertificate
      private lateinit var serverIntermediateCa: HeldCertificate
      private lateinit var serverCert: HeldCertificate
      private lateinit var clientRootCa: HeldCertificate
      private lateinit var clientIntermediateCa: HeldCertificate
      private lateinit var clientCert: HeldCertificate
    
      @BeforeEach
      fun setUp() {
        platform.assumeNotOpenJSSE()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 13K bytes
    - Click Count (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

        platform.assumeNotBouncyCastle()
    
        val clientRoot =
          HeldCertificate
            .Builder()
            .certificateAuthority(1)
            .build()
        val clientIntermediate =
          HeldCertificate
            .Builder()
            .certificateAuthority(0)
            .signedBy(clientRoot)
            .build()
        val clientCertificate =
          HeldCertificate
            .Builder()
            .signedBy(clientIntermediate)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Feb 03 08:16:15 GMT 2026
    - 7.5K bytes
    - Click Count (0)
  4. okhttp-tls/README.md

    HeldCertificate intermediateCertificate = new HeldCertificate.Builder()
        .certificateAuthority(0)
        .signedBy(rootCertificate)
        .build();
    
    HeldCertificate serverCertificate = new HeldCertificate.Builder()
        .addSubjectAlternativeName("localhost")
        .signedBy(intermediateCertificate)
        .build();
    ```
    
    To serve this configuration the server needs to provide its clients with a chain of certificates
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:01:42 GMT 2026
    - 9.1K bytes
    - Click Count (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

      fun pinRootNotPresentInChain() {
        // Fails on 11.0.1 https://github.com/square/okhttp/issues/4703
        val rootCa =
          HeldCertificate
            .Builder()
            .serialNumber(1L)
            .certificateAuthority(1)
            .commonName("root")
            .build()
        val intermediateCa =
          HeldCertificate
            .Builder()
            .signedBy(rootCa)
            .certificateAuthority(0)
            .serialNumber(2L)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 24.4K bytes
    - Click Count (2)
  6. 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 Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat Nov 01 12:18:11 GMT 2025
    - 7.9K bytes
    - Click Count (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformRule.kt

            val heldCertificate =
              HeldCertificate
                .Builder()
                .commonName("localhost")
                .addSubjectAlternativeName("localhost")
                .rsa2048()
                .build()
            return@lazy HandshakeCertificates
              .Builder()
              .heldCertificate(heldCertificate)
              .addTrustedCertificate(heldCertificate.certificate)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 15.5K bytes
    - Click Count (1)
  8. 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 Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 49.7K bytes
    - Click Count (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

        val heldCertificate =
          HeldCertificate
            .Builder()
            .commonName("example.com")
            .addSubjectAlternativeName(localIpAddress!!)
            .build()
        val handshakeCertificates =
          HandshakeCertificates
            .Builder()
            .heldCertificate(heldCertificate)
            .addTrustedCertificate(heldCertificate.certificate)
            .build()
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:02:18 GMT 2026
    - 146.5K bytes
    - Click Count (0)
Back to Top