/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 78 mockKeyStore.setKeyEntry("Alias", null, null, new Certificate[]{certificate}); 99 mockKeyStore.setKeyEntry("Alias", key, null, new Certificate[]{certificate}); 109 mockKeyStore.setKeyEntry("Alias3", key, null, new Certificate[]{certificate}); 117 mockKeyStore.setCertificateEntry(null, certificate); 167 certificate = cf.generateCertificate(certArray);
|
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 | 616 * the given certificate. 617 * <p>If the certificate is of type X.509 and has a <i>key usage</i> 620 * the certificate and its corresponding private key are not 624 * @param certificate the certificate of the identity whose signature is 627 * @exception InvalidKeyException if the public key in the certificate 632 public final void initVerify(Certificate certificate) argument 634 // If the certificate is of type X509Certificate, 637 if (certificate instanceof java.security.cert.X509Certificate) { 641 X509Certificate cert = (X509Certificate)certificate; [all...] |
/libcore/ojluni/src/main/java/java/security/cert/ |
H A D | X509CRL.java | 51 * <p>Each revoked certificate is 52 * identified in a CRL by its certificate serial number. When a 53 * certificate-using system uses a certificate (e.g., for verifying a 55 * certificate signature and validity but also acquires a suitably- 56 * recent CRL and checks that the certificate serial number is not on 61 * entry may be removed when the certificate expiration date is reached. 95 * CRLs are instantiated using a certificate factory. The following is an 174 * @return the encoded form of this certificate 353 * Gets the CRL entry, if any, with the given certificate serialNumbe 381 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 | CertificateFactoryTest.java | 309 Certificate certificate = cf.generateCertificate(certStream); 310 assertNotNull(certificate); 396 certs.add(cert3.certificate); 397 certs.add(cert2.certificate); 398 certs.add(cert1.certificate); 401 duplicatedCerts.add(cert2.certificate); 510 // PKCS7 certificate bags are not guaranteed to be in order. 521 fail("List of certificate should be immutable"); 540 public X509Certificate certificate; field in class:CertificateFactoryTest.KeyHolder 562 serial = issuer.certificate [all...] |
H A D | X509CertSelectorTest.java | 155 private X509Certificate bouncycastleToJava(Certificate certificate) throws Exception { argument 156 byte[] encoded = certificate.getEncoded();
|
/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 | 60 * Following certificate chain was taken from https://www.verisign.com and 61 * uses MD2withRSA for the root certificate. This chain stops validating 66 * A selfsigned certificate using MD2withRSA 122 * A certificate signed by selfSignedCertMD2 222 * A certificate signed by signedCert1Chain1 339 * Following certificate chain was taken from https://www.thawte.com and 340 * uses MD5withRSA for the root certificate. This chain stops validating 345 * A selfsigned certificate using MD5withRSA 408 * A certificate signed by selfSignedCertMD5 507 * 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 | 297 * Return a server keystore with a matched RSA certificate and 298 * private key as well as a CA certificate. 306 * Return a keystore with a CA certificate 314 * Return a client keystore with a matched RSA certificate and 315 * private key as well as a CA certificate. 323 * Return a client keystore with a matched RSA certificate and 324 * private key as well as a CA certificate. 332 * Return a client keystore with a matched RSA certificate and 333 * private key as well as a CA certificate. 341 * Return a keystore with a second CA certificate tha [all...] |
/libcore/ojluni/src/main/java/javax/crypto/ |
H A D | Cipher.java | 348 // The OID for the KeyUsage extension in an X.509 v3 certificate 1445 * Initializes this cipher with the public key from the given certificate. 1450 * <p>If the certificate is of type X.509 and has a <i>key usage</i> 1453 * the certificate and its corresponding private key are not 1460 * derived from the public key in the given certificate, the underlying 1494 * @param certificate the certificate 1497 * certificate is inappropriate for initializing this cipher, or this 1499 * public key in the given certificate, or the keysize of the public key 1500 * in the given certificate ha 1507 init(int opmode, Certificate certificate) argument 1577 init(int opmode, Certificate certificate, SecureRandom random) argument [all...] |
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
H A D | DefaultHostnameVerifierTest.java | 415 * certificate. 420 // Verify using a certificate where the pattern is in the CN 426 // Verify using a certificate where the pattern is in a DNS SubjectAltName 435 * Verifies the provided hostname against the provided server certificate. 437 private boolean verifyWithServerCertificate(String hostname, X509Certificate certificate) { argument 440 (certificate != null) ? new Certificate[] {certificate} : new Certificate[0];
|
/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
|
H A D | X509KeyManagerTest.java | 80 String certificate = "-----BEGIN CERTIFICATE-----\n" field in class:X509KeyManagerTest 101 ByteArrayInputStream certArray = new ByteArrayInputStream(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/java/net/ |
H A D | URLConnectionTest.java | 605 * Verify that we don't retry connections on certificate verification errors. 2938 * Checks that OkHttp's certificate pinning logic is not used for the common case 2943 * Android has its own API / implementation for certificate pinning. We can't 2944 * easily test that there is *no* code path that would invoke OkHttp's certificate 2948 * <p>To check whether OkHttp performs certificate pinning under the hood, this 2950 * are exclusively used in relation to certificate pinning. Android only provides 2965 * but for the HTTP case. In the HTTP case, no certificate or trust management 3147 for (X509Certificate certificate : certificates) { 3148 result.add(certificate.getSubjectDN() + " " + certificate [all...] |