Home
last modified time | relevance | path

Searched refs:cert (Results 1 – 25 of 114) sorted by relevance

12345

/cts/tools/utils/
Dcertificates.py22 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/
DCertInstallDelegateTest.java33 import java.security.cert.Certificate;
34 import java.security.cert.CertificateException;
35 import java.security.cert.CertificateFactory;
62 byte[] cert = TEST_CA.getBytes(); in testCanAccessApis()
65 assertTrue("Certificate installation failed", mDpm.installCaCert(null, cert)); in testCanAccessApis()
68 assertTrue("Certificate is not installed properly", mDpm.hasCaCertInstalled(null, cert)); in testCanAccessApis()
72 containsCertificate(mDpm.getInstalledCaCerts(null), cert)); in testCanAccessApis()
75 mDpm.uninstallCaCert(null, cert); in testCanAccessApis()
76 assertFalse("Certificate was not uninstalled", mDpm.hasCaCertInstalled(null, cert)); in testCanAccessApis()
97 Certificate cert = readCertificate(certBuffer); in containsCertificate() local
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-2109/
Dpoc.c29 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/
DAndroid.bp6 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",
DREADME5 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/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DDelegatedCertInstallerTest.java41 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/tests/tests/identity/src/android/security/identity/cts/
DAttestationTest.java34 import java.security.cert.Certificate;
35 import java.security.cert.X509Certificate;
91 X509Certificate cert = certChain.iterator().next(); in attestationTest() local
92 ParsedAttestationRecord record = new ParsedAttestationRecord(cert); in attestationTest()
135 X509Certificate cert = certs[i]; in verifyCertificateChain() local
137 cert.checkValidity(); in verifyCertificateChain()
138 cert.verify(parent.getPublicKey()); in verifyCertificateChain()
143 parent = cert; in verifyCertificateChain()
DX509CertificateSigningTest.java46 import java.security.cert.CertificateException;
47 import java.security.cert.X509Certificate;
87 X509Certificate cert = Util.signPublicKeyWithPrivateKey(keyToSignAlias, in testSigning() local
89 assertNotNull(cert); in testSigning()
90 Log.d(TAG, "Cert:\n--\n" + cert.toString() + "\n--\n"); in testSigning()
97 outputStream.write(cert.getEncoded()); in testSigning()
111 cert.getPublicKey().getEncoded()); in testSigning()
114 cert.verify(keyToSignWithKeyPair.getPublic()); // Throws if verification fails. in testSigning()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/scripts/
Dgenerate-client-cert-chain.sh33 -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/devicepolicy/app/common/src/com/android/cts/devicepolicy/
DTestCertificates.java25 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/tests/BlobStore/certs/
DREADME2 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
DAndroid.bp6 name: "cts-blob-helper-cert",
7 certificate: "cts-blob-helper-cert",
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/
DDirectDelegatedCertInstallerTest.java50 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 …]
DCertSelectionDelegateTest.java43 import java.security.cert.Certificate;
44 import java.security.cert.CertificateException;
45 import java.security.cert.CertificateFactory;
105 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testCanSelectKeychainKeypairs() local
107 assertThat(mDpm.installKeyPair(null, privKey, cert, alias)).isTrue(); in testCanSelectKeychainKeypairs()
164 private static Certificate getCertificate(byte[] cert) throws CertificateException { in getCertificate() argument
166 new ByteArrayInputStream(cert)); in getCertificate()
DCertInstallerReceiver.java29 import java.security.cert.Certificate;
30 import java.security.cert.CertificateException;
31 import java.security.cert.CertificateFactory;
124 String cert = intent.getStringExtra(EXTRA_CERT_DATA); in onReceive() local
133 new Base64InputStream(new ByteArrayInputStream(cert.getBytes()), in onReceive()
172 Certificate cert = readCertificate(certBuffer); in containsCertificate() local
173 if (certificateToMatch.equals(cert)) { in containsCertificate()
/cts/tests/tests/apache-http/src/android/net/http/cts/
DX509TrustManagerExtensionsTest.java22 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()
DSslCertificateTest.java26 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/appsecurity/res/pkgsigverify/
Dgenerate-apks.sh5 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/dsa-3072.pk8 --cert cts/hostsidetests/a…
6 …bled --key cts/hostsidetests/appsecurity/certs/pkgsigverify/ec-p256.pk8 --cert cts/hostsidetests/a…
7 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/rsa-2048.pk8 --cert cts/hostsidetests/a…
8 …bled --key cts/hostsidetests/appsecurity/certs/pkgsigverify/ec-p384.pk8 --cert cts/hostsidetests/a…
9 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/rsa-4096.pk8 --cert cts/hostsidetests/a…
12 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/dsa-3072.pk8 --cert cts/hostsidetests/a…
13 …bled --key cts/hostsidetests/appsecurity/certs/pkgsigverify/ec-p256.pk8 --cert cts/hostsidetests/a…
14 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/rsa-2048.pk8 --cert cts/hostsidetests/a…
17 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/dsa-3072.pk8 --cert cts/hostsidetests/a…
18 …bled --key cts/hostsidetests/appsecurity/certs/pkgsigverify/ec-p256.pk8 --cert cts/hostsidetests/a…
[all …]
/cts/tests/tests/security/src/android/security/cts/
DConscryptIntermediateVerificationTest.java24 import java.security.cert.Certificate;
25 import java.security.cert.CertificateException;
26 import java.security.cert.X509Certificate;
27 import java.security.cert.CertificateFactory;
53 for (Certificate cert : certs) { in loadCertificates()
54 result.add((X509Certificate) cert); in loadCertificates()
DCertBlacklistTest.java24 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()
DCertificateTest.java28 import java.security.cert.Certificate;
29 import java.security.cert.CertificateEncodingException;
30 import java.security.cert.CertificateException;
31 import java.security.cert.CertificateFactory;
32 import java.security.cert.X509Certificate;
124 for (X509Certificate cert : loadCertsFromDisk()) { in createWfaKeyStore()
125 keyStore.setCertificateEntry(String.format("%d", index++), cert); in createWfaKeyStore()
141 Certificate cert = certFactory.generateCertificate(fis); in loadCertsFromDisk() local
142 if (cert instanceof X509Certificate) { in loadCertsFromDisk()
143 certs.add((X509Certificate) cert); in loadCertsFromDisk()
/cts/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/src/android/security/net/config/cts/
DResourceSourceTest.java24 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/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/
DAdminActionBookkeepingTest.java26 import java.security.cert.Certificate;
27 import java.security.cert.CertificateFactory;
64 final Certificate cert = CertificateFactory.getInstance("X.509") in testGetPolicyInstalledCaCerts() local
70 assertNull(keyStore.getCertificateAlias(cert)); in testGetPolicyInstalledCaCerts()
72 final String alias = keyStore.getCertificateAlias(cert); in testGetPolicyInstalledCaCerts()
/cts/tests/tests/content/data/
Dreadme.txt13 …lse --key cts/hostsidetests/appsecurity/certs/pkgsigverify/dsa-3072.pk8 --cert cts/hostsidetests/a…
14 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/dsa-3072.pk8 --cert cts/hostsidetests/a…
15 …bled --key cts/hostsidetests/appsecurity/certs/pkgsigverify/ec-p384.pk8 --cert cts/hostsidetests/a…
16 …led --key cts/hostsidetests/appsecurity/certs/pkgsigverify/dsa-3072.pk8 --cert cts/hostsidetests/a…
28 …openssl req -x509 -newkey rsa:4096 -nodes -keyout test-key.pem -out test-cert.x509.pem -days 36500…
30 …openssl cms -sign -binary -nosmimecap -in CtsPkgInstallTinyAppV2V3V4.digests -signer test-cert.x50…
31 …openssl cms -sign -binary -nosmimecap -in HelloWorld5.digests -signer test-cert.x509.pem -inkey te…
32 …openssl cms -sign -binary -nosmimecap -in HelloWorld5_hdpi-v4.digests -signer test-cert.x509.pem -…
33 …openssl cms -sign -binary -nosmimecap -in HelloWorld5_mdpi-v4.digests -signer test-cert.x509.pem -…
36 …tallTinyAppV2V3V4.digests.signature -inform der -CAfile test-cert.x509.pem -signer test-cert.x509.…
/cts/tests/security/src/android/keystore/cts/
DCertificateUtils.java21 import org.bouncycastle.cert.X509CertificateHolder;
22 import org.bouncycastle.cert.X509v3CertificateBuilder;
28 import java.security.cert.CertificateFactory;
29 import java.security.cert.X509Certificate;

12345