- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for KeyPair (0.08 sec)
-
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)) } /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.6K bytes - Viewed (0) -
okhttp-tls/api/okhttp-tls.api
public final fun -deprecated_keyPair ()Ljava/security/KeyPair; public fun <init> (Ljava/security/KeyPair;Ljava/security/cert/X509Certificate;)V public final fun certificate ()Ljava/security/cert/X509Certificate; public final fun certificatePem ()Ljava/lang/String; public static final fun decode (Ljava/lang/String;)Lokhttp3/tls/HeldCertificate; public final fun keyPair ()Ljava/security/KeyPair; public final fun privateKeyPkcs1Pem ()Ljava/lang/String;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Feb 26 19:17:33 UTC 2022 - 3.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CertificatePinnerTest.kt
/** Multiple certificates generated from the same keypair have the same pin. */ @Test fun sameKeypairSamePin() { val heldCertificateA2 = HeldCertificate.Builder() .keyPair(certA1.keyPair) .serialNumber(101L) .build() val keypairACertificate2Pin = pin(heldCertificateA2.certificate) val heldCertificateB2 = HeldCertificate.Builder() .keyPair(certB1.keyPair) .serialNumber(201L)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.9K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt
), ) assertThat(okHttpCertificateWithBadSignature.checkSignature(root.keyPair.public)).isFalse() // Wrong public key. assertThat(okHttpCertificate.checkSignature(certificate.keyPair.public)).isFalse() } @Test fun `EC issuer and signature`() { val root = HeldCertificate.Builder() .certificateAuthority(0)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 43.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt
@Test @Disabled fun heldCertificate() { val heldCertificate: HeldCertificate = HeldCertificate.Builder().build() val certificate: X509Certificate = heldCertificate.certificate() val keyPair: KeyPair = heldCertificate.keyPair() } @Test @Disabled fun mediaType() { val mediaType: MediaType = MediaType.get("") val type: String = mediaType.type() val subtype: String = mediaType.subtype()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/test/java/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()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/TlsUtil.kt
val chain = arrayOfNulls<Certificate>(1 + intermediates.size) chain[0] = heldCertificate.certificate intermediates.copyInto(chain, 1) keyStore.setKeyEntry("private", heldCertificate.keyPair.private, password, chain) } val factory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()) factory.init(keyStore, password) val result = factory.keyManagers!!
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.1K bytes - Viewed (0) -
okhttp/src/test/java/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()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.8K bytes - Viewed (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())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 7.1K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/HandshakeCertificates.kt
} fun build(): HandshakeCertificates { val immutableInsecureHosts = insecureHosts.toImmutableList() val heldCertificate = heldCertificate if (heldCertificate != null && heldCertificate.keyPair.private.format == null) { throw KeyStoreException("unable to support unencodable private key") } val keyManager = newKeyManager(null, heldCertificate, *(intermediates ?: emptyArray()))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.5K bytes - Viewed (0)