/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | HostnameVerifierTest.java | 23 import java.security.cert.X509Certificate; 48 X509Certificate x509; in testVerify() 51 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify() 52 mySSLSession session = new mySSLSession(new X509Certificate[] {x509}); in testVerify() 59 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify() 60 session = new mySSLSession(new X509Certificate[] {x509}); in testVerify() 66 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify() 67 session = new mySSLSession(new X509Certificate[] {x509}); in testVerify() 75 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify() 76 session = new mySSLSession(new X509Certificate[] {x509}); in testVerify() [all …]
|
D | X509TrustManagerTest.java | 6 import java.security.cert.X509Certificate; 14 private X509Certificate[] setX509Certificate() throws Exception { in setX509Certificate() 16 X509Certificate pemCert = (X509Certificate) certFact.generateCertificate( in setX509Certificate() 18 X509Certificate[] xcert = { pemCert }; in setX509Certificate() 22 private X509Certificate[] setInvalid() throws Exception { in setInvalid() 24 X509Certificate pemCert = (X509Certificate) certFact.generateCertificate( in setInvalid() 26 X509Certificate[] xcert = { pemCert }; in setInvalid() 32 X509Certificate[] xcert = null; in test_checkClientTrusted_01() 40 xcert = new X509Certificate[0]; in test_checkClientTrusted_01() 66 X509Certificate[] xcert = setInvalid(); in test_checkClientTrusted_02() [all …]
|
D | X509KeyManagerTest.java | 10 import java.security.cert.X509Certificate; 31 private X509Certificate[] cert; 635 cert = new X509Certificate[3]; in init() 636 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in init() 637 cert[1] = (X509Certificate) cf.generateCertificate(certArray2); in init() 638 cert[2] = (X509Certificate) cf.generateCertificate(certArray3); in init() 639 … keyTest.setKeyEntry("clientKey_01", keys[0], PASSWORD, new X509Certificate[] {cert[0]}); in init() 640 … keyTest.setKeyEntry("clientKey_02", keys[1], PASSWORD, new X509Certificate[] {cert[0], cert[1]}); in init() 641 … keyTest.setKeyEntry("clientKey_03", keys[2], PASSWORD, new X509Certificate[] {cert[0], cert[2]}); in init() 648 cert = new X509Certificate[1]; in init() [all …]
|
D | HandshakeCompletedEventTest.java | 41 import javax.security.cert.X509Certificate; 122 mySSLSession session = new mySSLSession((X509Certificate[]) null); in test_getPeerCertificateChain() 131 X509Certificate xc = X509Certificate.getInstance(bis); in test_getPeerCertificateChain() 132 X509Certificate[] xcs = {xc}; in test_getPeerCertificateChain() 136 X509Certificate[] res = event.getPeerCertificateChain(); in test_getPeerCertificateChain() 154 session = new mySSLSession((X509Certificate[]) null); in test_getPeerCertificates() 456 public X509Certificate[] getChain() { in getChain() 527 public X509Certificate[] getChain() { in getChain() 558 private X509Certificate[] chain; 562 public void checkClientTrusted(X509Certificate[] chain, String authType) { in checkClientTrusted() [all …]
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | X509CertPath.java | 37 import java.security.cert.X509Certificate; 71 private List<X509Certificate> certs; 115 if (obj instanceof X509Certificate == false) { in X509CertPath() 127 new ArrayList<X509Certificate>((List<X509Certificate>)certs)); in X509CertPath() 176 private static List<X509Certificate> parsePKIPATH(InputStream is) in parsePKIPATH() 178 List<X509Certificate> certList = null; in parsePKIPATH() 189 return Collections.<X509Certificate>emptyList(); in parsePKIPATH() 193 certList = new ArrayList<X509Certificate>(seq.length); in parsePKIPATH() 197 certList.add((X509Certificate)certFac.generateCertificate in parsePKIPATH() 217 private static List<X509Certificate> parsePKCS7(InputStream is) in parsePKCS7() [all …]
|
D | Builder.java | 87 abstract Collection<X509Certificate> getMatchingCerts in getMatchingCerts() 99 abstract void verifyCert(X509Certificate cert, State currentState, in verifyCert() 100 List<X509Certificate> certPathList) in verifyCert() 111 abstract boolean isPathCompleted(X509Certificate cert); in isPathCompleted() 119 abstract void addCertToPath(X509Certificate cert, in addCertToPath() 120 LinkedList<X509Certificate> certPathList); in addCertToPath() 128 (LinkedList<X509Certificate> certPathList); in removeFinalCertFromPath() 281 X509Certificate cert, GeneralNameInterface target) in targetDistance() 429 Collection<X509Certificate> resultCerts, in addMatchingCerts() 432 X509Certificate targetCert = selector.getCertificate(); in addMatchingCerts() [all …]
|
D | ForwardBuilder.java | 40 import java.security.cert.X509Certificate; 66 private final Set<X509Certificate> trustedCerts; 85 trustedCerts = new HashSet<X509Certificate>(trustAnchors.size()); in ForwardBuilder() 88 X509Certificate trustedCert = anchor.getTrustedCert(); in ForwardBuilder() 109 Collection<X509Certificate> getMatchingCerts(State currentState, in getMatchingCerts() 124 Comparator<X509Certificate> comparator = in getMatchingCerts() 126 Set<X509Certificate> certs = new TreeSet<>(comparator); in getMatchingCerts() 145 Collection<X509Certificate> eeCerts) in getMatchingEECerts() 189 Collection<X509Certificate> caCerts) in getMatchingCACerts() 285 for (X509Certificate trustedCert : trustedCerts) { in getMatchingCACerts() [all …]
|
D | OCSP.java | 38 import java.security.cert.X509Certificate; 114 public static RevocationStatus check(X509Certificate cert, in check() 115 X509Certificate issuerCert) in check() 152 public static RevocationStatus check(X509Certificate cert, in check() 153 X509Certificate issuerCert, in check() 155 X509Certificate responderCert, in check() 164 public static RevocationStatus check(X509Certificate cert, in check() 165 X509Certificate issuerCert, in check() 167 X509Certificate responderCert, in check() 200 X509Certificate issuerCert, in check() [all …]
|
D | X509CertificatePair.java | 32 import java.security.cert.X509Certificate; 78 private X509Certificate forward; 79 private X509Certificate reverse; 100 public X509CertificatePair(X509Certificate forward, X509Certificate reverse) in X509CertificatePair() 155 public void setForward(X509Certificate cert) throws CertificateException { in setForward() 163 public void setReverse(X509Certificate cert) throws CertificateException { in setReverse() 173 public X509Certificate getForward() { in getForward() 182 public X509Certificate getReverse() { in getReverse()
|
/libcore/luni/src/test/java/libcore/java/security/cert/ |
D | X509CertificateTest.java | 47 import java.security.cert.X509Certificate; 139 private final X509Certificate getCertificate(CertificateFactory f, String name) in getCertificate() 144 return (X509Certificate) f.generateCertificate(is); in getCertificate() 153 …private final Collection<? extends X509Certificate> getCertificates(CertificateFactory f, String n… in getCertificates() 158 return (Collection<? extends X509Certificate>) f.generateCertificates(is); in getCertificates() 327 X509Certificate c = getCertificate(f, CERT_RSA); in getPublicKey() 337 X509Certificate c = getCertificate(f, CERT_RSA); in getType() 342 X509Certificate c = getCertificate(f, CERT_RSA); in verify() 377 X509Certificate c1 = getCertificate(f, CERT_RSA); in check_equals() 378 X509Certificate c2 = getCertificate(f, CERT_RSA); in check_equals() [all …]
|
D | CertPathValidatorTest.java | 29 import java.security.cert.X509Certificate; 65 private OCSPResp generateOCSPResponse(X509Certificate serverCertJca, X509Certificate caCertJca, in generateOCSPResponse() 92 X509Certificate serverCert = (X509Certificate) serverEntry.getCertificate(); in runOCSPStapledTest() 94 (X509Certificate) caEntry.getCertificate(), caEntry.getPrivateKey(), certStatus); in runOCSPStapledTest() 97 .singleton(new TrustAnchor((X509Certificate) rootCaEntry.getCertificate(), null))); in runOCSPStapledTest() 115 ArrayList<X509Certificate> chain = new ArrayList<>(); in runOCSPStapledTest() 117 chain.add((X509Certificate) caEntry.getCertificate()); in runOCSPStapledTest()
|
/libcore/ojluni/src/main/java/java/security/cert/ |
D | PKIXRevocationChecker.java | 102 private X509Certificate ocspResponderCert; 104 private Map<X509Certificate, byte[]> ocspResponses = Collections.emptyMap(); 145 public void setOcspResponderCert(X509Certificate cert) { in setOcspResponderCert() 159 public X509Certificate getOcspResponderCert() { in getOcspResponderCert() 196 public void setOcspResponses(Map<X509Certificate, byte[]> responses) in setOcspResponses() argument 199 this.ocspResponses = Collections.<X509Certificate, byte[]>emptyMap(); in setOcspResponses() 201 Map<X509Certificate, byte[]> copy = new HashMap<>(responses.size()); in setOcspResponses() 202 for (Map.Entry<X509Certificate, byte[]> e : responses.entrySet()) { in setOcspResponses() 219 public Map<X509Certificate, byte[]> getOcspResponses() { in getOcspResponses() 220 Map<X509Certificate, byte[]> copy = new HashMap<>(ocspResponses.size()); in getOcspResponses() [all …]
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | CertConstraintParameters.java | 28 import java.security.cert.X509Certificate; 36 private final X509Certificate cert; 42 public CertConstraintParameters(X509Certificate c, boolean match) { in CertConstraintParameters() 47 public CertConstraintParameters(X509Certificate c) { in CertConstraintParameters() 56 public X509Certificate getCertificate() { in getCertificate()
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | PKIXBuilderParametersTest.java | 37 import java.security.cert.X509Certificate; 245 X509Certificate cert[] = new X509Certificate[2]; in testPKIXBuilderParametersKeyStoreCertSelector04() 246 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in testPKIXBuilderParametersKeyStoreCertSelector04() 247 cert[1] = (X509Certificate) cf.generateCertificate(certArray2); in testPKIXBuilderParametersKeyStoreCertSelector04() 276 X509Certificate cert[] = new X509Certificate[2]; in testGetMaxPathLength() 277 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in testGetMaxPathLength() 278 cert[1] = (X509Certificate) cf.generateCertificate(certArray2); in testGetMaxPathLength() 304 X509Certificate cert[] = new X509Certificate[2]; in testSetMaxPathLength() 305 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in testSetMaxPathLength() 306 cert[1] = (X509Certificate) cf.generateCertificate(certArray2); in testSetMaxPathLength() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | KeyStore2Test.java | 44 import java.security.cert.X509Certificate; 140 X509Certificate cert[] = new X509Certificate[2]; in creatCertificate() 141 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in creatCertificate() 142 cert[1] = (X509Certificate) cf.generateCertificate(certArray2); in creatCertificate() 169 X509Certificate cert[] = new X509Certificate[2]; in test_aliases() 170 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in test_aliases() 171 cert[1] = (X509Certificate) cf.generateCertificate(certArray2); in test_aliases() 214 X509Certificate cert[] = new X509Certificate[2]; in test_containsAliasLjava_lang_String() 215 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in test_containsAliasLjava_lang_String() 216 cert[1] = (X509Certificate) cf.generateCertificate(certArray2); in test_containsAliasLjava_lang_String() [all …]
|
D | Identity2Test.java | 31 import java.security.cert.X509Certificate; 47 X509Certificate cert; 49 public CertificateImpl(X509Certificate cert) { in CertificateImpl() 248 X509Certificate cert[] = new X509Certificate[1]; in test_certificates() 249 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in test_certificates() 270 X509Certificate cert[] = new X509Certificate[1]; in test_removeCertificateLjava_security_Certificate() 271 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in test_removeCertificateLjava_security_Certificate() 304 X509Certificate cert[] = new X509Certificate[1]; in test_equalsLjava_lang_Object() 305 cert[0] = (X509Certificate) cf.generateCertificate(certArray); in test_equalsLjava_lang_Object() 324 X509Certificate cert[] = new X509Certificate[1]; in test_identityEqualsLjava_security_Identity() [all …]
|
/libcore/ojluni/annotations/hiddenapi/sun/security/provider/certpath/ |
D | X509CertificatePair.java | 37 java.security.cert.X509Certificate forward, java.security.cert.X509Certificate reverse) in X509CertificatePair() 56 public void setForward(java.security.cert.X509Certificate cert) in setForward() 61 public void setReverse(java.security.cert.X509Certificate cert) in setReverse() 66 public java.security.cert.X509Certificate getForward() { in getForward() 70 public java.security.cert.X509Certificate getReverse() { in getReverse() 110 private java.security.cert.X509Certificate forward; 112 private java.security.cert.X509Certificate reverse;
|
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/ |
D | X509TrustManagerImpl.java | 21 import java.security.cert.X509Certificate; 26 public void checkClientTrusted(X509Certificate[] ax509certificate, String s) in checkClientTrusted() 41 public void checkServerTrusted(X509Certificate[] ax509certificate, String s) in checkServerTrusted() 56 public X509Certificate[] getAcceptedIssuers() { in getAcceptedIssuers() 57 X509Certificate[] cert = new X509Certificate[0]; in getAcceptedIssuers()
|
/libcore/ojluni/src/main/java/javax/net/ssl/ |
D | X509ExtendedTrustManager.java | 31 import java.security.cert.X509Certificate; 96 public abstract void checkClientTrusted(X509Certificate[] chain, in checkClientTrusted() 144 public abstract void checkServerTrusted(X509Certificate[] chain, in checkServerTrusted() 185 public abstract void checkClientTrusted(X509Certificate[] chain, in checkClientTrusted() 231 public abstract void checkServerTrusted(X509Certificate[] chain, in checkServerTrusted()
|
/libcore/ojluni/src/main/java/javax/security/auth/x500/ |
D | X500PrivateCredential.java | 29 import java.security.cert.X509Certificate; 42 private X509Certificate cert; 57 public X500PrivateCredential(X509Certificate cert, PrivateKey key) { in X500PrivateCredential() 76 public X500PrivateCredential(X509Certificate cert, PrivateKey key, in X500PrivateCredential() 91 public X509Certificate getCertificate() { in getCertificate()
|
/libcore/ojluni/src/test/java/security/cert/ |
D | AKISerialNumberTest.java | 117 X509Certificate rootCert = getCertFromMimeEncoding(ROOT_CERT); in main() 120 X509Certificate eeCert = getCertFromMimeEncoding(EE_CERT_WITH_FULL_AKI); in main() 121 X509Certificate intCert = getCertFromMimeEncoding(INT_CERT_WITH_KEYID_AKI); in main() 131 ArrayList<X509Certificate> certs = new ArrayList<>(); in main() 143 private static X509Certificate getCertFromMimeEncoding(String encoded) in getCertFromMimeEncoding() 148 return (X509Certificate)cf.generateCertificate(stream); in getCertFromMimeEncoding()
|
/libcore/luni/src/test/java/tests/targets/security/cert/ |
D | CertificateTest.java | 37 import java.security.cert.X509Certificate; 76 private final X509Certificate md2Root = loadCertificate("md2Root.pem"); 88 private final X509Certificate md5ChainRoot = loadCertificate("md5ChainRoot.pem"); 99 private final X509Certificate md5ChainIntermediate 112 private final X509Certificate md5ChainLeaf = loadCertificate("md5ChainLeaf.pem"); 124 private final X509Certificate sha1ChainRoot = loadCertificate("sha1ChainRoot.pem"); 136 private final X509Certificate sha1ChainIntermediate 149 private final X509Certificate sha1ChainLeaf = loadCertificate("sha1ChainLeaf.pem"); 240 private PKIXParameters createPkixParams(X509Certificate rootCa) throws Exception { in createPkixParams() 293 private X509Certificate loadCertificate(String name) throws CertificateException { in loadCertificate() [all …]
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
D | TestTrustManager.java | 26 import java.security.cert.X509Certificate; 72 public void checkClientTrusted(X509Certificate[] chain, String authType) in checkClientTrusted() 88 public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) in checkClientTrusted() 110 public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) in checkClientTrusted() 137 public void checkServerTrusted(X509Certificate[] chain, String authType) in checkServerTrusted() 153 public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) in checkServerTrusted() 175 public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) in checkServerTrusted() 209 public X509Certificate[] getAcceptedIssuers() { in getAcceptedIssuers() 210 X509Certificate[] result = trustManager.getAcceptedIssuers(); in getAcceptedIssuers()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/cert/ |
D | X509CertificateTest.java | 58 import javax.security.cert.X509Certificate; 116 private java.security.cert.X509Certificate cert; 118 private javax.security.cert.X509Certificate tbt_cert; 120 private java.security.cert.X509Certificate javaCert; 124 private javax.security.cert.X509Certificate javaxCert; 138 this.cert = (java.security.cert.X509Certificate) cf in setUp() 140 this.tbt_cert = X509Certificate.getInstance(cert.getEncoded()); in setUp() 143 this.javaCert = (java.security.cert.X509Certificate)cf in setUp() 145 this.javaxCert = X509Certificate.getInstance(javaCert.getEncoded()); in setUp() 152 this.javaxSSCert = X509Certificate.getInstance(javaCert in setUp() [all …]
|
/libcore/support/src/test/java/libcore/java/security/ |
D | TestKeyStore.java | 43 import java.security.cert.X509Certificate; 547 X509Certificate caCert; in createKeys() 548 X509Certificate[] caCertChain; in createKeys() 555 caCert = (X509Certificate)signer.getCertificate(); in createKeys() 556 caCertChain = (X509Certificate[])signer.getCertificateChain(); in createKeys() 561 X509Certificate x509c; in createKeys() 621 X509Certificate[] x509cc; in createKeys() 626 x509cc = new X509Certificate[] { x509c }; in createKeys() 628 x509cc = new X509Certificate[caCertChain.length+1]; in createKeys() 648 public static X509Certificate createCa(PublicKey publicKey, in createCa() [all …]
|