/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 | 84 String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:Identity2Test 100 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate.getBytes()); 285 // Removing the same certificate a second time should fail.
|
H A D | KeyStore2Test.java | 76 // creating a certificate 77 String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:KeyStore2Test 93 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate.getBytes()); 269 assertEquals("the public key of the certificate from getCertificate() " 270 + "did not equal the original certificate", 276 // testing for a certificate chain 278 assertEquals("the certificate for alias2 is supposed to exist", 297 // certificate entry 300 assertEquals("certificate entry - the alias returned for this certificate wa [all...] |
/libcore/ojluni/src/main/java/java/security/ |
H A D | Identity.java | 225 * Adds a certificate for this identity. If the identity has a public 226 * key, the public key in the certificate must be the same, and if 228 * public key is set to be that specified in the certificate. 232 * as its argument to see if it's ok to add a certificate. 234 * @param certificate the certificate to be added. 236 * @exception KeyManagementException if the certificate is not valid, 237 * if the public key in the certificate being added conflicts with 242 * adding a certificate. 246 public void addCertificate(Certificate certificate) argument 296 removeCertificate(Certificate certificate) argument [all...] |
H A D | Signature.java | 553 * the given certificate. 554 * <p>If the certificate is of type X.509 and has a <i>key usage</i> 557 * the certificate and its corresponding private key are not 561 * @param certificate the certificate of the identity whose signature is 564 * @exception InvalidKeyException if the public key in the certificate 569 public final void initVerify(Certificate certificate) argument 571 // If the certificate is of type X509Certificate, 574 if (certificate instanceof java.security.cert.X509Certificate) { 578 X509Certificate cert = (X509Certificate)certificate; [all...] |
/libcore/ojluni/src/main/java/java/security/cert/ |
H A D | X509CRL.java | 50 * <p>Each revoked certificate is 51 * identified in a CRL by its certificate serial number. When a 52 * certificate-using system uses a certificate (e.g., for verifying a 54 * certificate signature and validity but also acquires a suitably- 55 * recent CRL and checks that the certificate serial number is not on 60 * entry may be removed when the certificate expiration date is reached. 94 * CRLs are instantiated using a certificate factory. The following is an 179 * @return the encoded form of this certificate 320 * Gets the CRL entry, if any, with the given certificate serialNumbe 348 getRevokedCertificate(X509Certificate certificate) argument [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 | 287 Certificate certificate = cf.generateCertificate(certStream); 288 assertNotNull(certificate); 374 certs.add(cert3.certificate); 375 certs.add(cert2.certificate); 376 certs.add(cert1.certificate); 379 duplicatedCerts.add(cert2.certificate); 488 // PKCS7 certificate bags are not guaranteed to be in order. 499 fail("List of certificate should be immutable"); 518 public X509Certificate certificate; field in class:CertificateFactoryTest.KeyHolder 540 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/targets/security/cert/ |
H A D | CertificateTest.java | 40 * Following certificate chain was taken from https://www.verisign.com and 41 * uses MD2withRSA for the root certificate. This chain stops validating 46 * A selfsigned certificate using MD2withRSA 102 * A certificate signed by selfSignedCertMD2 202 * A certificate signed by signedCert1Chain1 319 * Following certificate chain was taken from https://www.thawte.com and 320 * uses MD5withRSA for the root certificate. This chain stops validating 325 * A selfsigned certificate using MD5withRSA 388 * A certificate signed by selfSignedCertMD5 487 * A certificate signe [all...] |
H A D | CertPathBuilderTestPKIX.java | 55 for (Certificate certificate : pke.getCertificateChain()) { 56 certList.add(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 | 57 String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:X509CRLTest 73 ByteArrayInputStream certArray = new ByteArrayInputStream(certificate 267 * 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 | 269 * Return a server keystore with a matched RSA certificate and 270 * private key as well as a CA certificate. 278 * Return a keystore with a CA certificate 286 * Return a client keystore with a matched RSA certificate and 287 * private key as well as a CA certificate. 295 * Return a keystore with a second CA certificate that does not 296 * trust the server certificate returned by getServer for negative 374 /** a private key entry to use for the generation of the certificate */ 486 * certificate and OCSP responses. Otherwise, the certificate [all...] |
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
H A D | KeyManagerFactoryTest.java | 237 X509Certificate certificate = certificateChain[0]; 238 assertEquals(keyType, keyAlgName, certificate.getPublicKey().getAlgorithm()); 240 String sigAlgName = certificate.getSigAlgName();
|
H A D | DefaultHostnameVerifierTest.java | 410 * certificate. 415 // Verify using a certificate where the pattern is in the CN 421 // Verify using a certificate where the pattern is in a DNS SubjectAltName 439 * Verifies the provided hostname against the provided server certificate. 441 private boolean verifyWithServerCertificate(String hostname, X509Certificate certificate) { argument 444 (certificate != null) ? new Certificate[] {certificate} : new Certificate[0];
|
/libcore/ojluni/src/main/java/javax/crypto/ |
H A D | Cipher.java | 687 // The OID for the KeyUsage extension in an X.509 v3 certificate 1462 * Initializes this cipher with the public key from the given certificate. 1467 * <p>If the certificate is of type X.509 and has a <i>key usage</i> 1470 * the certificate and its corresponding private key are not 1477 * derived from the public key in the given certificate, the underlying 1511 * @param certificate the certificate 1514 * certificate is inappropriate for initializing this cipher, or this 1516 * public key in the given certificate, or the keysize of the public key 1517 * in the given certificate ha 1521 init(int opmode, Certificate certificate) argument 1588 init(int opmode, Certificate certificate, SecureRandom random) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
H A D | HandshakeCompletedEventTest.java | 51 private String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:HandshakeCompletedEventTest 121 ByteArrayInputStream bis = new ByteArrayInputStream(certificate.getBytes()); 554 * Implements basically a dummy TrustManager. It stores the certificate
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
H A D | TestSSLContext.java | 241 * SSLContext with certificate and key as well as SSLServerSocket 314 * certificate chain from the given KeyStore and a TrustManager 347 public static void assertCertificateInKeyStore(Certificate certificate, argument 355 if (certificate.equals(keyStoreCertificate)) {
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
H A D | CipherTest.java | 1724 Certificate certificate = certificateWithKeyUsage(keyUsage); 1725 assertCipherInitWithKeyUsage(certificate, allowEncrypt, Cipher.ENCRYPT_MODE); 1726 assertCipherInitWithKeyUsage(certificate, allowDecrypt, Cipher.DECRYPT_MODE); 1727 assertCipherInitWithKeyUsage(certificate, allowWrap, Cipher.WRAP_MODE); 1728 assertCipherInitWithKeyUsage(certificate, allowUnwrap, Cipher.UNWRAP_MODE); 1731 private void assertCipherInitWithKeyUsage(Certificate certificate, argument 1736 cipher.init(mode, certificate); 1739 cipher.init(mode, certificate); 1758 + " for " + certificate);
|