Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for CERTIFICATE (0.1 sec)

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

     * ```
     *
     * In this example the HTTP client already knows and trusts the last certificate, "Entrust Root
     * Certification Authority - G2". That certificate is used to verify the signature of the
     * intermediate certificate, "Entrust Certification Authority - L1M". The intermediate certificate
     * is used to verify the signature of the "www.squareup.com" certificate.
     *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 21.6K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/CertificatePinnerTest.kt

        }
    
        // Should not be pinned:
        certificatePinner.check("uk", listOf(certB1.certificate))
        certificatePinner.check("co.uk", listOf(certB1.certificate))
        certificatePinner.check("anotherexample.co.uk", listOf(certB1.certificate))
        certificatePinner.check("foo.anotherexample.co.uk", listOf(certB1.certificate))
      }
    
      @Test
      fun testBadPin() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt

        val certificate =
          HeldCertificate
            .Builder()
            .keyPair(publicKey, privateKey)
            .build()
    
        val certificateByteString = certificate.certificate.encoded.toByteString()
    
        val okHttpCertificate =
          CertificateAdapters.certificate
            .fromDer(certificateByteString)
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 43.9K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/HostnameVerifierTest.kt

      }
    
      private fun certificate(certificate: String): X509Certificate =
        CertificateFactory
          .getInstance("X.509")
          .generateCertificate(ByteArrayInputStream(certificate.toByteArray()))
          as X509Certificate
    
      private fun session(certificate: String): SSLSession = FakeSSLSession(certificate(certificate))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 40.4K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

        // Add a bad intermediate CA and have that issue a rogue certificate for localhost. Prepare
        // an SSL context for an attacking webserver. It includes both these rogue certificates plus the
        // trusted good certificate above. The attack is that by including the good certificate in the
        // chain, we may trick the certificate pinner into accepting the rouge certificate.
        val compromisedIntermediateCa =
          HeldCertificate
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 24.3K bytes
    - Viewed (1)
  6. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

        builder = builder.heldCertificate(heldCertificate, heldCertificate.certificate())
        builder = builder.addTrustedCertificate(heldCertificate.certificate())
      }
    
      @Test @Disabled
      fun heldCertificate() {
        val heldCertificate: HeldCertificate = HeldCertificate.Builder().build()
        val certificate: X509Certificate = heldCertificate.certificate()
        val keyPair: KeyPair = heldCertificate.keyPair()
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        val certificate: X509Certificate = heldCertificate.certificate
        val certificatePinner: CertificatePinner = CertificatePinner.Builder().build()
        val certificates: List<Certificate> = listOf()
        certificatePinner.check("", listOf(certificate))
        certificatePinner.check("", arrayOf<Certificate>(certificate, certificate).toList())
        val pin: String = CertificatePinner.pin(certificate)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt

            )
          },
        )
    
      /**
       * ```
       * Certificate ::= SEQUENCE  {
       *   tbsCertificate       TBSCertificate,
       *   signatureAlgorithm   AlgorithmIdentifier,
       *   signatureValue       BIT STRING
       * }
       * ```
       */
      internal val certificate: BasicDerAdapter<Certificate> =
        Adapters.sequence(
          "Certificate",
          tbsCertificate,
          algorithmIdentifier,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 13.6K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt

          val keyManager =
            newKeyManager(
              null,
              serverCert,
              serverIntermediateCa.certificate,
            )
          val trustManager =
            newTrustManager(
              null,
              Arrays.asList(serverRootCa.certificate, clientRootCa.certificate),
              emptyList(),
            )
          val sslContext = SSLContext.getInstance("TLS")
          sslContext.init(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt

      /** Can still coalesce when pinning is used if pins match.  */
      @Test
      fun coalescesWhenCertificatePinsMatch() {
        val pinner =
          CertificatePinner
            .Builder()
            .add("san.com", pin(certificate.certificate))
            .build()
        client = client.newBuilder().certificatePinner(pinner).build()
        server.enqueue(MockResponse())
        server.enqueue(MockResponse())
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jun 19 11:44:16 UTC 2025
    - 19.1K bytes
    - Viewed (0)
Back to top