Home
last modified time | relevance | path

Searched refs:certificate (Results 1 – 25 of 33) sorted by relevance

12

/libcore/ojluni/src/main/java/java/security/
DIdentity.java248 public void addCertificate(Certificate certificate) in addCertificate() argument
257 if (!keyEquals(publicKey, certificate.getPublicKey())) { in addCertificate()
262 publicKey = certificate.getPublicKey(); in addCertificate()
264 certificates.addElement(certificate); in addCertificate()
298 public void removeCertificate(Certificate certificate) in removeCertificate() argument
304 if (certificate == null || !certificates.contains(certificate)) { in removeCertificate()
307 certificates.removeElement(certificate); in removeCertificate()
DSignature.java636 public final void initVerify(Certificate certificate) in initVerify() argument
641 if (certificate instanceof java.security.cert.X509Certificate) { in initVerify()
645 X509Certificate cert = (X509Certificate)certificate; in initVerify()
657 PublicKey publicKey = certificate.getPublicKey(); in initVerify()
/libcore/luni/src/test/resources/keystore/
DREADME.md3 This directory contains the same certificate and private key stored in multiple
7 To generate the certificate and private key:
11 -out certificate.pem -keyout privkey.pem
40 openssl1 pkcs12 -export -out pbe-rc2.p12 -in certificate.pem -inkey privkey.pem \
47 openssl3 pkcs12 -legacy -export -out pbe-rc2.p12 -in certificate.pem -inkey privkey.pem \
58 Essentially the same as above, but with 3DES encryption for both the certificate
65 openssl3 to generate all supported variations of private key and certificate
75 openssl3 pkcs12 -export -out sha3.p12 -in certificate.pem -inkey privkey.pem \
Dmkstores.sh11 openssl3 pkcs12 -export -out "$OUTFILE" -in certificate.pem \
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKeyStorePrivateKeyEntryTest.java62 Certificate certificate = cf.generateCertificate(certArray); in testGetCertificateChain() local
63 assertTrue(certificate instanceof X509Certificate); in testGetCertificateChain()
65 String algorithm = certificate.getPublicKey().getAlgorithm(); in testGetCertificateChain()
74 privateKey, new Certificate[] { certificate }); in testGetCertificateChain()
DKeyStore3Test.java49 private Certificate certificate; field in KeyStore3Test
78 mockKeyStore.setKeyEntry("Alias", null, null, new Certificate[]{certificate}); in test_setKeyEntry_key_is_null()
99 mockKeyStore.setKeyEntry("Alias", key, null, new Certificate[]{certificate}); in test_setKeyEntry_key_is_private()
109 mockKeyStore.setKeyEntry("Alias3", key, null, new Certificate[]{certificate}); in test_setKeyEntry_key_is_public()
117 mockKeyStore.setCertificateEntry(null, certificate); in test_setCertificateEntry_null()
167 certificate = cf.generateCertificate(certArray); in setUp()
DIdentity2Test.java84 String certificate = "-----BEGIN CERTIFICATE-----\n" field in Identity2Test
100 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate.getBytes());
/libcore/luni/src/test/java/tests/security/
DCertificateFactoryTest.java43 Certificate certificate = certificateFactory.generateCertificate( in testCertificateFactory() local
45 assertNotNull(certificate); in testCertificateFactory()
/libcore/ojluni/src/main/java/java/security/cert/
DX509CRL.java382 public X509CRLEntry getRevokedCertificate(X509Certificate certificate) { in getRevokedCertificate() argument
383 X500Principal certIssuer = certificate.getIssuerX500Principal(); in getRevokedCertificate()
388 return getRevokedCertificate(certificate.getSerialNumber()); in getRevokedCertificate()
/libcore/luni/src/test/java/libcore/java/security/
DCodeSourceTest.java64 Certificate certificate = keyStore.getCertificate(alias); in createCodeSigner() local
65 assertTrue(certificate instanceof X509Certificate); in createCodeSigner()
66 cert = (X509Certificate) certificate; in createCodeSigner()
DProtectionDomainTest.java96 Certificate certificate = keyStore.getCertificate(alias); in createCodeSigner() local
97 assertTrue(certificate instanceof X509Certificate); in createCodeSigner()
98 cert = (X509Certificate) certificate; in createCodeSigner()
/libcore/luni/src/test/java/tests/targets/security/
DKeyStoreTest.java113 Certificate certificate = null; in createAndTest() local
115 certificate = certificateFactory in createAndTest()
124 generator = KeyPairGenerator.getInstance(certificate.getPublicKey() in createAndTest()
133 .getPrivate(), new Certificate[] {certificate}); in createAndTest()
DKeyStorePkcs7FormatTest.java138 X509Certificate certificate = (X509Certificate) keyEntry.getCertificate(); in keystoreIsReadableAndConsistent() local
139 assertEquals("CN=Test", certificate.getSubjectX500Principal().getName()); in keystoreIsReadableAndConsistent()
142 RSAPublicKey publicKey = (RSAPublicKey) certificate.getPublicKey(); in keystoreIsReadableAndConsistent()
/libcore/luni/src/test/java/tests/security/cert/
DPKIXBuilderParametersTest.java48 String certificate = "-----BEGIN CERTIFICATE-----\n" field in PKIXBuilderParametersTest
239 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate in testPKIXBuilderParametersKeyStoreCertSelector04()
270 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate in testGetMaxPathLength()
298 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate in testSetMaxPathLength()
341 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate in testToString()
DX509CRL2Test.java41 String certificate = "-----BEGIN CERTIFICATE-----\n" field in X509CRL2Test
68 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate in setUp()
DX509CRLTest.java57 String certificate = "-----BEGIN CERTIFICATE-----\n" field in X509CRLTest
73 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate
/libcore/luni/src/test/java/libcore/java/security/cert/
DSubjectAlternativeNameTest.java66 private X509Certificate bouncycastleToJava(Certificate certificate) throws Exception { in bouncycastleToJava() argument
67 byte[] encoded = certificate.getEncoded(); in bouncycastleToJava()
DX509CertSelectorTest.java155 private X509Certificate bouncycastleToJava(Certificate certificate) throws Exception { in bouncycastleToJava() argument
156 byte[] encoded = certificate.getEncoded(); in bouncycastleToJava()
/libcore/luni/src/test/java/tests/targets/security/cert/
DCertPathBuilderTestPKIX.java55 for (Certificate certificate : pke.getCertificateChain()) { in getCertPathParameters()
56 certList.add(certificate); in getCertPathParameters()
/libcore/support/src/test/java/libcore/java/security/
DTestKeyStore.java841 X509Certificate certificate = (X509Certificate) privateKey.getCertificate(); in privateKey() local
842 if (!certificate.getSigAlgName().contains(signatureAlgorithm)) { in privateKey()
894 Certificate certificate = certificateEntry.getTrustedCertificate(); in issuer() local
895 if (!(certificate instanceof X509Certificate)) { in issuer()
898 X509Certificate x = (X509Certificate) certificate; in issuer()
906 + "\nsecond: " + certificate ); in issuer()
908 found = certificate; in issuer()
986 Certificate certificate = certificateEntry.getTrustedCertificate(); in rootCertificate() local
987 if (!certificate.getPublicKey().getAlgorithm().equals(algorithm)) { in rootCertificate()
990 if (!(certificate instanceof X509Certificate)) { in rootCertificate()
[all …]
/libcore/luni/src/test/java/libcore/javax/security/auth/
DX500PrivateCredentialTest.java77 Certificate certificate = certificateFactory.generateCertificate( in createCertificate() local
80 return (X509Certificate) certificate; in createCertificate()
/libcore/ojluni/src/main/java/javax/crypto/
DCipher.java1526 public final void init(int opmode, Certificate certificate) in init() argument
1529 init(opmode, certificate, JceSecurity.RANDOM); in init()
1596 public final void init(int opmode, Certificate certificate, in init() argument
1605 if (certificate instanceof java.security.cert.X509Certificate) { in init()
1608 X509Certificate cert = (X509Certificate)certificate; in init()
1629 (certificate==null? null:certificate.getPublicKey()); in init()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DX509KeyManagerTest.java80 String certificate = "-----BEGIN CERTIFICATE-----\n" field in X509KeyManagerTest
101 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate
/libcore/ojluni/annotations/mmodule/javax/crypto/
DCipher.annotated.java81 public final void init(int opmode, java.security.cert.Certificate certificate) throws java.security… in init() argument
83 public final void init(int opmode, java.security.cert.Certificate certificate, java.security.Secure… in init() argument
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DDefaultHostnameVerifierTest.java437 private boolean verifyWithServerCertificate(String hostname, X509Certificate certificate) { in verifyWithServerCertificate() argument
440 (certificate != null) ? new Certificate[] {certificate} : new Certificate[0]; in verifyWithServerCertificate()

12