/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/tests/tests/security/ |
D | Android.bp | 114 certificate: ":permission-test-cert-1", 123 certificate: ":permission-test-cert-1", 132 certificate: ":permission-test-cert-2", 141 certificate: ":permission-test-cert-3", 150 certificate: ":permission-test-cert-4", 159 certificate: ":permission-test-cert-1", 161 ":permission-test-cert-2", 171 certificate: ":permission-test-cert-1", 173 ":permission-test-cert-2", 183 certificate: ":permission-test-cert-3", [all …]
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-39706/src/android/security/cts/CVE_2021_39706/ |
D | PocPolicyManager.java | 35 public boolean installCaCert(byte[] cert) { in installCaCert() argument 36 return mDevicePolicyManager.installCaCert(mComponentName, cert); in installCaCert() 39 public boolean hasCaCertInstalled(byte[] cert) { in hasCaCertInstalled() argument 40 return mDevicePolicyManager.hasCaCertInstalled(mComponentName, cert); in hasCaCertInstalled() 43 public void uninstallCaCert(byte[] cert) { in uninstallCaCert() argument 44 mDevicePolicyManager.uninstallCaCert(mComponentName, cert); in uninstallCaCert()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CVE_2021_0341.java | 35 import java.security.cert.Certificate; 36 import java.security.cert.CertificateEncodingException; 37 import java.security.cert.CertificateFactory; 49 import javax.security.cert.CertificateException; 62 private javax.security.cert.X509Certificate[] xCerts = null; 67 xCerts = new javax.security.cert.X509Certificate[xc.length]; in CVE_2021_0341_SSLSession() 69 for (Certificate cert : xc) { in CVE_2021_0341_SSLSession() 70 xCerts[i++] = javax.security.cert.X509Certificate.getInstance(cert.getEncoded()); in CVE_2021_0341_SSLSession() 111 public javax.security.cert.X509Certificate[] getPeerCertificateChain() in getPeerCertificateChain() 217 java.security.cert.X509Certificate x509 = in testPocCVE_2021_0341() [all …]
|
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; 59 for (Certificate cert : certs) { in loadCertificates() 60 result.add((X509Certificate) cert); in loadCertificates()
|
D | CertBlocklistTest.java | 23 import java.security.cert.Certificate; 24 import java.security.cert.CertificateException; 25 import java.security.cert.CertificateFactory; 26 import java.security.cert.X509Certificate; 105 for (Certificate cert : collection) { in loadCertificates() 106 certs[i++] = (X509Certificate) cert; in loadCertificates()
|
D | CertificateTest.java | 42 import java.security.cert.Certificate; 43 import java.security.cert.CertificateEncodingException; 44 import java.security.cert.CertificateException; 45 import java.security.cert.CertificateFactory; 46 import java.security.cert.X509Certificate; 157 for (X509Certificate cert : loadCertsFromDisk()) { in createWfaKeyStore() 158 keyStore.setCertificateEntry(String.format("%d", index++), cert); in createWfaKeyStore() 174 Certificate cert = certFactory.generateCertificate(fis); in loadCertsFromDisk() local 175 if (cert instanceof X509Certificate) { in loadCertsFromDisk() 176 certs.add((X509Certificate) cert); in loadCertsFromDisk()
|
/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/appsearch/certs/ |
D | Android.bp | 6 name: "cts-appsearch-helper-cert-a", 7 certificate: "cts-appsearch-helper-cert-a", 11 name: "cts-appsearch-helper-cert-b", 12 certificate: "cts-appsearch-helper-cert-b",
|
D | README | 5 development/tools/make_key cts-appsearch-helper-cert-a '/CN=cts-appsearch-helper-cert-a' 6 development/tools/make_key cts-appsearch-helper-cert-b '/CN=cts-appsearch-helper-cert-b'
|
/cts/tests/tests/identity/src/android/security/identity/cts/ |
D | AttestationTest.java | 34 import java.security.cert.Certificate; 35 import java.security.cert.X509Certificate; 93 X509Certificate cert = certChain.iterator().next(); in attestationTest() local 94 ParsedAttestationRecord record = new ParsedAttestationRecord(cert); in attestationTest() 137 X509Certificate cert = certs[i]; in verifyCertificateChain() local 139 cert.checkValidity(); in verifyCertificateChain() 140 cert.verify(parent.getPublicKey()); in verifyCertificateChain() 145 parent = cert; in verifyCertificateChain()
|
D | X509CertificateSigningTest.java | 47 import java.security.cert.CertificateException; 48 import java.security.cert.X509Certificate; 88 X509Certificate cert = Util.signPublicKeyWithPrivateKey(keyToSignAlias, in testSigning() local 90 assertNotNull(cert); in testSigning() 91 Log.d(TAG, "Cert:\n--\n" + cert.toString() + "\n--\n"); in testSigning() 98 outputStream.write(cert.getEncoded()); in testSigning() 112 cert.getPublicKey().getEncoded()); in testSigning() 115 cert.verify(keyToSignWithKeyPair.getPublic()); // Throws if verification fails. in testSigning()
|
/cts/hostsidetests/appsearch/certs/ |
D | Android.bp | 6 name: "cts-appsearch-hosttest-helper-cert-a", 7 certificate: "cts-appsearch-hosttest-helper-cert-a", 11 name: "cts-appsearch-hosttest-helper-cert-b", 12 certificate: "cts-appsearch-hosttest-helper-cert-b",
|
D | README | 5 …lopment/tools/make_key cts-appsearch-hosttest-helper-cert-a '/CN=cts-appsearch-hosttest-helper-cer… 6 …lopment/tools/make_key cts-appsearch-hosttest-helper-cert-b '/CN=cts-appsearch-hosttest-helper-cer…
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | DelegatedCertInstallerTest.java | 41 import java.security.cert.Certificate; 42 import java.security.cert.CertificateFactory; 123 final byte[] cert = TestCertificates.TEST_CA.getBytes(); in testCaCertsOperations() 125 .generateCertificate(new ByteArrayInputStream(cert)); in testCaCertsOperations() 137 installCaCert(cert); in testCaCertsOperations() 140 ADMIN_RECEIVER_COMPONENT, cert)); in testCaCertsOperations() 143 verifyCaCert(cert); in testCaCertsOperations() 152 removeCaCert(cert); in testCaCertsOperations() 155 ADMIN_RECEIVER_COMPONENT, cert)); in testCaCertsOperations() 165 installCaCert(cert); in testCaCertsOperations() [all …]
|
/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/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/certificates/ |
D | Certificates.java | 23 import java.security.cert.Certificate; 24 import java.security.cert.CertificateException; 25 import java.security.cert.CertificateFactory; 79 public Certificate generateCertificate(byte[] cert) { in generateCertificate() argument 82 new ByteArrayInputStream(cert)); in generateCertificate()
|
/cts/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/ |
D | TestCertificates.java | 25 import java.security.cert.Certificate; 26 import java.security.cert.CertificateFactory; 117 public static Certificate userCertFromString(String cert) throws Exception { in userCertFromString() argument 119 new Base64InputStream(new ByteArrayInputStream(cert.getBytes()), Base64.DEFAULT)); in userCertFromString() 126 public static Certificate caCertFromString(String cert) throws Exception { in caCertFromString() argument
|
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/ |
D | DirectDelegatedCertInstallerTest.java | 50 import java.security.cert.Certificate; 51 import java.security.cert.CertificateException; 52 import java.security.cert.CertificateFactory; 99 final byte[] cert = TEST_CA.getBytes(); in testCaCertsOperations() 101 .generateCertificate(new ByteArrayInputStream(cert)); in testCaCertsOperations() 109 + " beginning of the test").that(mDpm.hasCaCertInstalled(null, cert)).isFalse(); in testCaCertsOperations() 113 mDpm.installCaCert(null, cert)).isTrue(); in testCaCertsOperations() 115 mDpm.hasCaCertInstalled(null, cert)).isTrue(); in testCaCertsOperations() 119 containsCertificate(mDpm.getInstalledCaCerts(null), cert)).isTrue(); in testCaCertsOperations() 125 mDpm.uninstallCaCert(null, cert); in testCaCertsOperations() [all …]
|
D | CertSelectionDelegateTest.java | 44 import java.security.cert.Certificate; 45 import java.security.cert.CertificateException; 46 import java.security.cert.CertificateFactory; 106 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testCanSelectKeychainKeypairs() local 108 assertThat(mDpm.installKeyPair(null, privKey, cert, alias)).isTrue(); in testCanSelectKeychainKeypairs() 165 private static Certificate getCertificate(byte[] cert) throws CertificateException { in getCertificate() argument 167 new ByteArrayInputStream(cert)); in getCertificate()
|
/cts/tests/BlobStore/certs/ |
D | README | 2 development/tools/make_key cts-blob-helper-cert '/CN=cts-blob-helper-cert' 6 openssl x509 -outform der -in cts-blob-helper-cert.x509.pem -out cts-blob-helper-cert.der
|
/cts/hostsidetests/appsecurity/res/pkgsigverify/ |
D | generate-apks.sh | 8 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/dsa-3072.pk8 --cert cts/hostsidetests/a… 9 …bled --key cts/hostsidetests/appsecurity/certs/pkgsigverify/ec-p256.pk8 --cert cts/hostsidetests/a… 10 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/rsa-2048.pk8 --cert cts/hostsidetests/a… 11 …bled --key cts/hostsidetests/appsecurity/certs/pkgsigverify/ec-p384.pk8 --cert cts/hostsidetests/a… 12 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/rsa-4096.pk8 --cert cts/hostsidetests/a… 15 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/dsa-3072.pk8 --cert cts/hostsidetests/a… 16 …bled --key cts/hostsidetests/appsecurity/certs/pkgsigverify/ec-p256.pk8 --cert cts/hostsidetests/a… 17 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/rsa-2048.pk8 --cert cts/hostsidetests/a… 20 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/dsa-3072.pk8 --cert cts/hostsidetests/a… 21 …bled --key cts/hostsidetests/appsecurity/certs/pkgsigverify/ec-p256.pk8 --cert cts/hostsidetests/a… [all …]
|
/cts/tests/tests/apache-http/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/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/src/android/security/net/config/cts/ |
D | ResourceSourceTest.java | 32 import java.security.cert.Certificate; 33 import java.security.cert.CertificateFactory; 34 import java.security.cert.X509Certificate; 93 for (Certificate cert : factory.generateCertificates(is)) { in loadCertificates() 94 result.add((X509Certificate)cert); in loadCertificates() 111 for (X509Certificate cert : trustedCerts) { in getTrustedCertificates() 112 result.add(cert); in getTrustedCertificates()
|