/cts/tools/utils/ |
D | certificates.py | 22 cert = None variable in Certificate 24 def __init__(self, cert, key): argument 25 self.cert = cert 29 return crypto.dump_certificate(crypto.FILETYPE_PEM, self.cert) 47 cert = crypto.load_certificate(crypto.FILETYPE_PEM, data) 49 return Certificate(cert, key) 59 cert = crypto.X509() 60 cert.set_pubkey(key) 61 cert.set_version(2) 62 cert.set_serial_number(random.randint(0, 2**20)) [all …]
|
/cts/hostsidetests/devicepolicy/app/DelegateApp/src/com/android/cts/delegate/ |
D | CertInstallDelegateTest.java | 37 import java.security.cert.Certificate; 38 import java.security.cert.CertificateException; 39 import java.security.cert.CertificateFactory; 140 byte[] cert = TEST_CA.getBytes(); in testCanAccessApis() 143 assertTrue("Certificate installation failed", mDpm.installCaCert(null, cert)); in testCanAccessApis() 146 assertTrue("Certificate is not installed properly", mDpm.hasCaCertInstalled(null, cert)); in testCanAccessApis() 150 containsCertificate(mDpm.getInstalledCaCerts(null), cert)); in testCanAccessApis() 153 mDpm.uninstallCaCert(null, cert); in testCanAccessApis() 154 assertFalse("Certificate was not uninstalled", mDpm.hasCaCertInstalled(null, cert)); in testCanAccessApis() 178 Certificate cert = readCertificate(certBuffer); in containsCertificate() local [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | DelegatedCertInstallerTest.java | 39 import java.security.cert.Certificate; 40 import java.security.cert.CertificateFactory; 190 final byte[] cert = TEST_CA.getBytes(); in testCaCertsOperations() 192 .generateCertificate(new ByteArrayInputStream(cert)); in testCaCertsOperations() 203 installCaCert(cert); in testCaCertsOperations() 206 ADMIN_RECEIVER_COMPONENT, cert)); in testCaCertsOperations() 209 verifyCaCert(cert); in testCaCertsOperations() 218 removeCaCert(cert); in testCaCertsOperations() 221 ADMIN_RECEIVER_COMPONENT, cert)); in testCaCertsOperations() 231 installCaCert(cert); in testCaCertsOperations() [all …]
|
D | KeyManagementTest.java | 57 import java.security.cert.Certificate; 58 import java.security.cert.CertificateException; 59 import java.security.cert.CertificateFactory; 60 import java.security.cert.CertificateParsingException; 61 import java.security.cert.X509Certificate; 115 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testCanInstallAndRemoveValidRsaKeypair() local 118 assertThat(mDevicePolicyManager.installKeyPair(getWho(), privKey, cert, alias)).isTrue(); in testCanInstallAndRemoveValidRsaKeypair() local 139 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testCanInstallWithAutomaticAccess() local 144 getWho(), privKey, new Certificate[] {cert}, grant, true)) in testCanInstallWithAutomaticAccess() 148 getWho(), privKey, new Certificate[] {cert}, withhold, false)) in testCanInstallWithAutomaticAccess() [all …]
|
D | CaCertManagementTest.java | 24 import java.security.cert.Certificate; 25 import java.security.cert.CertificateException; 26 import java.security.cert.CertificateFactory; 27 import java.security.cert.X509Certificate;
|
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/ |
D | DirectDelegatedCertInstallerTest.java | 42 import java.security.cert.Certificate; 43 import java.security.cert.CertificateException; 44 import java.security.cert.CertificateFactory; 134 final byte[] cert = TEST_CA.getBytes(); in testCaCertsOperations() 136 .generateCertificate(new ByteArrayInputStream(cert)); in testCaCertsOperations() 144 + " beginning of the test").that(mDpm.hasCaCertInstalled(null, cert)).isFalse(); in testCaCertsOperations() 148 mDpm.installCaCert(null, cert)).isTrue(); in testCaCertsOperations() 150 mDpm.hasCaCertInstalled(null, cert)).isTrue(); in testCaCertsOperations() 154 containsCertificate(mDpm.getInstalledCaCerts(null), cert)).isTrue(); in testCaCertsOperations() 160 mDpm.uninstallCaCert(null, cert); in testCaCertsOperations() [all …]
|
D | CertSelectionDelegateTest.java | 41 import java.security.cert.Certificate; 42 import java.security.cert.CertificateException; 43 import java.security.cert.CertificateFactory; 103 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testCanSelectKeychainKeypairs() local 105 assertThat(mDpm.installKeyPair(null, privKey, cert, alias)).isTrue(); in testCanSelectKeychainKeypairs() 152 private static Certificate getCertificate(byte[] cert) throws CertificateException { in getCertificate() argument 154 new ByteArrayInputStream(cert)); in getCertificate()
|
D | CertInstallerReceiver.java | 27 import java.security.cert.CertificateException; 28 import java.security.cert.CertificateFactory; 32 import java.security.cert.Certificate; 121 String cert = intent.getStringExtra(EXTRA_CERT_DATA); in onReceive() local 130 new Base64InputStream(new ByteArrayInputStream(cert.getBytes()), in onReceive() 162 Certificate cert = readCertificate(certBuffer); in containsCertificate() local 163 if (certificateToMatch.equals(cert)) { in containsCertificate()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/scripts/ |
D | generate-client-cert-chain.sh | 33 -out certs/ca.cert.pem 59 -out intermediate/certs/intermediate.cert.pem 78 -out user.cert.pem 84 "$WORKDIR"/user.cert.pem \ 85 "$WORKDIR"/intermediate/certs/intermediate.cert.pem \ 86 "$WORKDIR"/rootca/certs/ca.cert.pem \ 87 > "$TARGETDIR"/user-cert-chain.crt 95 -out "$TARGETDIR"/user-cert-chain.key
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-2109/ |
D | poc.c | 29 X509 *cert; variable 37 cert = d2i_X509_bio(in, NULL); // x509 should be present on all Android systems in main() 39 if(cert != NULL){ in main() 40 X509_free(cert); in main()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CertificateTest.java | 29 import java.security.cert.Certificate; 30 import java.security.cert.CertificateEncodingException; 31 import java.security.cert.CertificateException; 32 import java.security.cert.CertificateFactory; 33 import java.security.cert.X509Certificate; 126 for (X509Certificate cert : loadCertsFromDisk(wfaCertsDir)) { in createWfaKeyStore() 127 keyStore.setCertificateEntry(String.format("%d", index++), cert); in createWfaKeyStore() 143 Certificate cert = certFactory.generateCertificate(fis); in loadCertsFromDisk() local 144 if (cert instanceof X509Certificate) { in loadCertsFromDisk() 145 certs.add((X509Certificate) cert); in loadCertsFromDisk()
|
D | ConscryptIntermediateVerificationTest.java | 24 import java.security.cert.Certificate; 25 import java.security.cert.CertificateException; 26 import java.security.cert.X509Certificate; 27 import java.security.cert.CertificateFactory; 54 for (Certificate cert : certs) { in loadCertificates() 55 result.add((X509Certificate) cert); in loadCertificates()
|
D | CertBlacklistTest.java | 24 import java.security.cert.Certificate; 25 import java.security.cert.CertificateException; 26 import java.security.cert.CertificateFactory; 27 import java.security.cert.X509Certificate; 95 for (Certificate cert : collection) { in loadCertificates() 96 certs[i++] = (X509Certificate) cert; in loadCertificates()
|
/cts/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/src/android/security/net/config/cts/ |
D | ResourceSourceTest.java | 24 import java.security.cert.Certificate; 25 import java.security.cert.CertificateFactory; 26 import java.security.cert.X509Certificate; 76 for (Certificate cert : factory.generateCertificates(is)) { in loadCertificates() 77 result.add((X509Certificate)cert); in loadCertificates() 94 for (X509Certificate cert : trustedCerts) { in getTrustedCertificates() 95 result.add(cert); in getTrustedCertificates()
|
/cts/tests/tests/net/src/android/net/http/cts/ |
D | X509TrustManagerExtensionsTest.java | 22 import java.security.cert.Certificate; 23 import java.security.cert.X509Certificate; 51 for (Certificate cert : tm.getAcceptedIssuers()) { in testIsUserAddedCertificateDefaults() 52 assertFalse(xtm.isUserAddedCertificate((X509Certificate) cert)); in testIsUserAddedCertificateDefaults()
|
D | SslCertificateTest.java | 26 import java.security.cert.CertificateEncodingException; 27 import java.security.cert.CertificateException; 28 import java.security.cert.CertificateExpiredException; 29 import java.security.cert.CertificateNotYetValidException; 30 import java.security.cert.X509Certificate; 244 X509Certificate cert = new MockX509Certificate(); in testGetX509Certificate() local 245 ssl = new SslCertificate(cert); in testGetX509Certificate() 246 assertSame(cert, ssl.getX509Certificate()); in testGetX509Certificate()
|
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ |
D | AdminActionBookkeepingTest.java | 27 import java.security.cert.Certificate; 28 import java.security.cert.CertificateFactory; 93 final Certificate cert = CertificateFactory.getInstance("X.509") in testGetPolicyInstalledCaCerts() local 99 assertNull(keyStore.getCertificateAlias(cert)); in testGetPolicyInstalledCaCerts() 101 final String alias = keyStore.getCertificateAlias(cert); in testGetPolicyInstalledCaCerts()
|
/cts/tests/security/src/android/keystore/cts/ |
D | CertificateUtils.java | 21 import org.bouncycastle.cert.X509CertificateHolder; 22 import org.bouncycastle.cert.X509v3CertificateBuilder; 28 import java.security.cert.CertificateFactory; 29 import java.security.cert.X509Certificate;
|
/cts/tests/tests/net/src/org/apache/http/conn/ssl/cts/ |
D | AbstractVerifierTest.java | 32 import java.security.cert.CertificateEncodingException; 33 import java.security.cert.CertificateException; 34 import java.security.cert.CertificateExpiredException; 35 import java.security.cert.CertificateNotYetValidException; 36 import java.security.cert.X509Certificate;
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | AdminActionBookkeepingTest.java | 26 import java.security.cert.Certificate; 27 import java.security.cert.CertificateFactory; 190 final Certificate cert = CertificateFactory.getInstance("X.509") in testGetPolicyInstalledCaCerts() local 196 assertNull(keyStore.getCertificateAlias(cert)); in testGetPolicyInstalledCaCerts() 198 final String alias = keyStore.getCertificateAlias(cert); in testGetPolicyInstalledCaCerts()
|
/cts/tests/tests/networksecurityconfig/networksecurityconfig-cleartext/src/android/security/net/config/cts/ |
D | CleartextPermittedTest.java | 19 import java.security.cert.CertificateException; 20 import java.security.cert.X509Certificate;
|
/cts/tests/tests/networksecurityconfig/networksecurityconfig-cleartext-pre-P/src/android/security/net/config/cts/ |
D | CleartextPermittedTest.java | 19 import java.security.cert.CertificateException; 20 import java.security.cert.X509Certificate;
|
/cts/tests/tests/networksecurityconfig/networksecurityconfig-basic-domain/src/android/security/net/config/cts/ |
D | DomainConfigTest.java | 19 import java.security.cert.CertificateException; 20 import java.security.cert.X509Certificate;
|
/cts/tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/src/android/security/net/config/cts/ |
D | DownloadManagerTest.java | 42 import java.security.cert.Certificate; 43 import java.security.cert.CertificateFactory; 44 import java.security.cert.X509Certificate; 141 for (Certificate cert : certs) { in bindTLSServer() 142 chain[i++] = (X509Certificate) cert; in bindTLSServer()
|
/cts/tests/tests/webkit/src/android/webkit/cts/ |
D | WebViewSslTest.java | 44 import java.security.cert.CertificateFactory; 45 import java.security.cert.X509Certificate; 505 SslCertificate cert = mOnUiThread.getCertificate(); in testInsecureSiteClearsCertificate() local 506 assertNotNull(cert); in testInsecureSiteClearsCertificate() 507 assertEquals("Android", cert.getIssuedTo().getUName()); in testInsecureSiteClearsCertificate() 542 SslCertificate cert = mOnUiThread.getCertificate(); in testSecureSiteSetsCertificate() local 543 assertNotNull(cert); in testSecureSiteSetsCertificate() 544 assertEquals("Android", cert.getIssuedTo().getUName()); in testSecureSiteSetsCertificate() 902 X509Certificate cert = (X509Certificate) certFactory.generateCertificate( in testClientCertIssuersReceivedCorrectly() local 907 assertEquals(cert.getIssuerDN(), principals[0]); in testClientCertIssuersReceivedCorrectly()
|