/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 | 274 * using the certificate of the identity whose signature is going to be 277 * If the given certificate is an instance of {@link X509Certificate} and 278 * has a key usage parameter that indicates, that this certificate is not to 281 * @param certificate 282 * the certificate used to verify a signature. 284 * if the publicKey in the certificate is not valid or not to be 287 public final void initVerify(Certificate certificate) argument 289 if (certificate instanceof X509Certificate) { 290 Set<String> ce = ((X509Certificate) certificate).getCriticalExtensionOIDs(); 301 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...] |
H A D | X509CertSelector.java | 47 * A certificate selector ({@code CertSelector} for selecting {@code 83 * Sets the certificate that a matching certificate must be equal to. 85 * @param certificate 86 * the certificate to match, or null to not check this criteria. 88 public void setCertificate(X509Certificate certificate) { argument 89 certificateEquals = certificate; 93 * Returns the certificate that a matching certificate must be equal to. 95 * @return the certificate t 1102 match(Certificate certificate) argument [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/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/support/src/test/java/libcore/java/security/ |
H A D | TestKeyStore.java | 215 * Return a server keystore with a matched RSA certificate and 216 * private key as well as a CA certificate. 224 * Return a keystore with a CA certificate 232 * Return a client keystore with a matched RSA certificate and 233 * private key as well as a CA certificate. 241 * Return a keystore with a second CA certificate that does not 242 * trust the server certificate returned by getServer for negative 407 * certificate. Otherwise, the certificate will be self 408 * signed. The certificate wil [all...] |
/libcore/luni/src/main/java/javax/crypto/ |
H A D | Cipher.java | 848 * certificate. 854 * It the type of the certificate is X.509 and the certificate has a <i>key 860 * the certificate can not provide, the underlying implementation of this 872 * @param certificate 873 * the certificate. 875 * if the public key in the certificate can not be used to 878 public final void init(int opmode, Certificate certificate) argument 883 init(opmode, certificate, secureRandom); 888 * certificate an 921 init(int opmode, Certificate certificate, SecureRandom random) argument [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 | 131 * SSLContext with certificate and key as well as SSLServerSocket 204 * certificate chain from the given KeyStore and a TrustManager 237 public static void assertCertificateInKeyStore(Certificate certificate, argument 245 if (certificate.equals(keyStoreCertificate)) {
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
H A D | HandshakeCompletedEventTest.java | 52 private String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:HandshakeCompletedEventTest 122 ByteArrayInputStream bis = new ByteArrayInputStream(certificate.getBytes()); 556 * Implements basically a dummy TrustManager. It stores the certificate
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
H A D | CipherTest.java | 1386 Certificate certificate = certificateWithKeyUsage(keyUsage); 1387 assertCipherInitWithKeyUsage(certificate, allowEncrypt, Cipher.ENCRYPT_MODE); 1388 assertCipherInitWithKeyUsage(certificate, allowDecrypt, Cipher.DECRYPT_MODE); 1389 assertCipherInitWithKeyUsage(certificate, allowWrap, Cipher.WRAP_MODE); 1390 assertCipherInitWithKeyUsage(certificate, allowUnwrap, Cipher.UNWRAP_MODE); 1393 private void assertCipherInitWithKeyUsage(Certificate certificate, argument 1398 cipher.init(mode, certificate); 1401 cipher.init(mode, certificate); 1420 + " for " + certificate);
|