- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for keyPair (0.09 seconds)
-
okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt
* generated. */ fun keyPair(keyPair: KeyPair) = apply { this.keyPair = keyPair } /** * Sets the public/private key pair used for this certificate. If unset a key pair will be * generated. */ fun keyPair( publicKey: PublicKey, privateKey: PrivateKey, ) = apply { keyPair(KeyPair(publicKey, privateKey)) } /**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) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
.commonName("pinned intermediate") .signedBy(pinnedRoot) .build() val attackerSwitch = HeldCertificate .Builder() .serialNumber(5L) .keyPair(attackerIntermediate.keyPair) // share keys between compromised CA and leaf! .commonName("attacker") .addSubjectAlternativeName("attacker.com") .signedBy(pinnedIntermediate) .build()
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) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
val keyPair: KeyPair = heldCertificate.keyPair val certificatePem: String = heldCertificate.certificatePem() val privateKeyPkcs8Pem: String = heldCertificate.privateKeyPkcs8Pem() val privateKeyPkcs1Pem: String = heldCertificate.privateKeyPkcs1Pem() } @Test fun heldCertificateBuilder() { val keyPair: KeyPair = KeyPairGenerator.getInstance("").genKeyPair()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) -
okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt
.addTrustedCertificate(root.certificate) // BouncyCastle requires at least one .heldCertificate(certificate, intermediate.certificate) .build() assertPrivateKeysEquals( certificate.keyPair.private, handshakeCertificates.keyManager.getPrivateKey("private"), ) assertThat(handshakeCertificates.keyManager.getCertificateChain("private").toList())
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)