/libcore/luni/src/test/java/tests/security/ |
H A D | CertificateFactoryTest.java | 43 Certificate certificate = certificateFactory.generateCertificate( 45 assertNotNull(certificate);
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | KeyStorePrivateKeyEntryTest.java | 62 Certificate certificate = cf.generateCertificate(certArray); 63 assertTrue(certificate instanceof X509Certificate); 65 String algorithm = certificate.getPublicKey().getAlgorithm(); 71 // If all the certificate in the chain is X509Certificate, 74 privateKey, new Certificate[] { certificate });
|
H A D | KeyStore3Test.java | 49 private Certificate certificate; field in class:KeyStore3Test 74 certificate = cf.generateCertificate(certArray); 104 mockKeyStore.setKeyEntry("Alias", null, null, new Certificate[]{certificate}); 125 mockKeyStore.setKeyEntry("Alias", key, null, new Certificate[]{certificate}); 135 mockKeyStore.setKeyEntry("Alias3", key, null, new Certificate[]{certificate}); 143 mockKeyStore.setCertificateEntry(null, certificate);
|
H A D | Identity2Test.java | 85 String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:Identity2Test 101 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate.getBytes()); 286 // Removing the same certificate a second time should fail.
|
/libcore/luni/src/main/java/javax/net/ssl/ |
H A D | DefaultHostnameVerifier.java | 50 public boolean verify(String host, X509Certificate certificate) { argument 52 ? verifyIpAddress(host, certificate) 53 : verifyHostName(host, certificate); 57 * Returns true if {@code certificate} matches {@code ipAddress}. 59 private boolean verifyIpAddress(String ipAddress, X509Certificate certificate) { argument 60 for (String altName : getSubjectAltNames(certificate, ALT_IPA_NAME)) { 69 * Returns true if {@code certificate} matches {@code hostName}. 71 private boolean verifyHostName(String hostName, X509Certificate certificate) { argument 74 for (String altName : getSubjectAltNames(certificate, ALT_DNS_NAME)) { 82 X500Principal principal = certificate 93 getSubjectAltNames(X509Certificate certificate, int type) argument [all...] |
/libcore/luni/src/main/java/java/security/ |
H A D | Identity.java | 85 * @param certificate 88 * if the certificate is not valid. 90 public void addCertificate(Certificate certificate) throws KeyManagementException { argument 91 PublicKey certPK = certificate.getPublicKey(); 102 certificates.add(certificate); 132 * @param certificate 135 * if the certificate is not found. 137 public void removeCertificate(Certificate certificate) throws KeyManagementException { argument 139 if (!certificates.contains(certificate)) { 142 certificates.removeElement(certificate); [all...] |
H A D | Signature.java | 224 * using the certificate of the identity whose signature is going to be 227 * If the given certificate is an instance of {@link X509Certificate} and 228 * has a key usage parameter that indicates, that this certificate is not to 231 * @param certificate 232 * the certificate used to verify a signature. 234 * if the publicKey in the certificate is not valid or not to be 237 public final void initVerify(Certificate certificate) argument 239 if (certificate instanceof X509Certificate) { 240 Set ce = ((X509Certificate) certificate).getCriticalExtensionOIDs(); 251 boolean[] keyUsage = ((X509Certificate) certificate) [all...] |
/libcore/luni/src/main/java/java/security/cert/ |
H A D | X509CRL.java | 34 * Abstract base class for X.509 certificate revocation lists (CRL). 171 // TODO if there is no X.509 certificate provider installed 202 * Returns the CRL entry with the specified certificate serial number. 205 * the certificate serial number to search for a CRL entry. 206 * @return the entry for the specified certificate serial number, or {@code 212 * Returns the CRL entry for the specified certificate. 214 * @param certificate 215 * the certificate to search a CRL entry for. 216 * @return the entry for the specified certificate, or {@code null} if not 219 public X509CRLEntry getRevokedCertificate(X509Certificate certificate) { argument [all...] |
/libcore/luni/src/main/java/org/apache/harmony/security/provider/cert/ |
H A D | X509CertImpl.java | 67 private final Certificate certificate; field in class:X509CertImpl 72 // cache values retrieved from the certificate object, 88 // encoding of the certificate 93 * form of X.509 certificate provided via stream parameter. 94 * @param in input stream containing ASN.1 encoded form of certificate. 100 this.certificate = (Certificate) Certificate.ASN1.decode(in); 102 this.tbsCert = certificate.getTbsCertificate(); 113 public X509CertImpl(Certificate certificate) { argument 114 this.certificate = certificate; [all...] |
H A D | X509CRLImpl.java | 209 // null means that revoked certificate issuer is the same as CRL issuer 216 // certificate issuer differs from CRL issuer 230 * Searches for certificate in CRL. 232 * into account serial number and issuer of the certificate, 234 * by serial number of the specified certificate. 238 public X509CRLEntry getRevokedCertificate(X509Certificate certificate) { argument 239 if (certificate == null) { 240 throw new NullPointerException("certificate == null"); 248 BigInteger serialN = certificate.getSerialNumber(); 251 X500Principal certIssuer = certificate [all...] |
/libcore/luni/src/test/java/tests/targets/security/cert/ |
H A D | CertPathBuilderTestPKIX.java | 77 Certificate certificate = certificates.get(0); 79 assertEquals("unexpected certificate type", "X.509", certificate 82 X509Certificate x509Certificate = (X509Certificate) certificate;
|
H A D | CertificateTest.java | 41 * Following certificate chain was taken from https://www.verisign.com and 42 * uses MD2withRSA for the root certificate. This chain stops validating 47 * A selfsigned certificate using MD2withRSA 103 * A certificate signed by selfSignedCertMD2 203 * A certificate signed by signedCert1Chain1 320 * Following certificate chain was taken from https://www.thawte.com and 321 * uses MD5withRSA for the root certificate. This chain stops validating 326 * A selfsigned certificate using MD5withRSA 389 * A certificate signed by selfSignedCertMD5 488 * A certificate signe [all...] |
/libcore/luni/src/test/java/libcore/java/security/cert/ |
H A D | SubjectAlternativeNameTest.java | 66 private X509Certificate bouncycastleToJava(Certificate certificate) throws Exception { argument 67 byte[] encoded = certificate.getEncoded();
|
H A D | X509CertSelectorTest.java | 133 private X509Certificate bouncycastleToJava(Certificate certificate) throws Exception { argument 134 byte[] encoded = certificate.getEncoded();
|
H A D | CertificateFactoryTest.java | 284 Certificate certificate = cf.generateCertificate(certStream); 285 assertNotNull(certificate); 371 certs.add(cert3.certificate); 372 certs.add(cert2.certificate); 373 certs.add(cert1.certificate); 376 duplicatedCerts.add(cert2.certificate); 485 // PKCS7 certificate bags are not guaranteed to be in order. 496 fail("List of certificate should be immutable"); 515 public X509Certificate certificate; field in class:CertificateFactoryTest.KeyHolder 537 serial = issuer.certificate [all...] |
/libcore/luni/src/test/java/tests/targets/security/ |
H A D | KeyStoreTest.java | 103 Certificate certificate = null; 105 certificate = certificateFactory 114 generator = KeyPairGenerator.getInstance(certificate.getPublicKey() 123 .getPrivate(), new Certificate[] {certificate});
|
/libcore/luni/src/test/java/tests/security/cert/ |
H A D | PKIXBuilderParametersTest.java | 48 String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:PKIXBuilderParametersTest 213 * <code>keystore</code> does not contain at least one trusted certificate 239 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate 270 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate 298 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate 341 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate
|
H A D | X509CRL2Test.java | 41 String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:X509CRL2Test 68 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate
|
H A D | X509CRLTest.java | 59 String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:X509CRLTest 75 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate 269 * getRevokedCertificate(X509Certificate certificate) method testing.
|
/libcore/luni/src/main/java/javax/crypto/ |
H A D | Cipher.java | 713 * certificate. 719 * It the type of the certificate is X.509 and the certificate has a <i>key 725 * the certificate can not provide, the underlying implementation of this 737 * @param certificate 738 * the certificate. 740 * if the public key in the certificate can not be used to 743 public final void init(int opmode, Certificate certificate) argument 748 init(opmode, certificate, secureRandom); 753 * certificate an 786 init(int opmode, Certificate certificate, SecureRandom random) argument [all...] |
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/ |
H A D | X509KeyManagerImpl.java | 24 // creating a certificate 25 String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:X509KeyManagerImpl 41 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate
|
/libcore/crypto/src/main/java/org/conscrypt/ |
H A D | OpenSSLX509CRL.java | 288 public X509CRLEntry getRevokedCertificate(X509Certificate certificate) { argument 289 if (certificate instanceof OpenSSLX509Certificate) { 290 OpenSSLX509Certificate osslCert = (OpenSSLX509Certificate) certificate; 301 return getRevokedCertificate(certificate.getSerialNumber()); 358 throw new RuntimeException("cannot convert certificate", e);
|
/libcore/support/src/test/java/libcore/java/security/ |
H A D | TestKeyStore.java | 195 * Return a server keystore with a matched RSA certificate and 196 * private key as well as a CA certificate. 204 * Return a keystore with a CA certificate 212 * Return a client keystore with a matched RSA certificate and 213 * private key as well as a CA certificate. 221 * Return a keystore with a second CA certificate that does not 222 * trust the server certificate returned by getServer for negative 382 * certificate. Otherwise, the certificate will be self 383 * signed. The certificate wil [all...] |
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
H A D | KeyManagerFactoryTest.java | 242 X509Certificate certificate = certificateChain[0]; 243 assertEquals(keyType, keyAlgName, certificate.getPublicKey().getAlgorithm()); 248 String actualSigAlgName = certificate.getSigAlgName().toUpperCase();
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
H A D | TestSSLContext.java | 132 * SSLContext with certificate and key as well as SSLServerSocket 198 * certificate chain from the given KeyStore and a TrustManager 232 public static void assertCertificateInKeyStore(Certificate certificate, argument 240 if (certificate.equals(keyStoreCertificate)) {
|