Home
last modified time | relevance | path

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

12

/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/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DDelegatedCertInstallerTest.java174 byte[] cert = TEST_CA.getBytes(); in testCaCertsOperations()
181 installCaCert(cert); in testCaCertsOperations()
184 ADMIN_RECEIVER_COMPONENT, cert)); in testCaCertsOperations()
187 verifyCaCert(cert); in testCaCertsOperations()
191 removeCaCert(cert); in testCaCertsOperations()
194 ADMIN_RECEIVER_COMPONENT, cert)); in testCaCertsOperations()
200 installCaCert(cert); in testCaCertsOperations()
259 private void installCaCert(byte[] cert) { in installCaCert() argument
263 intent.putExtra(EXTRA_CERT_DATA, cert); in installCaCert()
268 private void removeCaCert(byte[] cert) { in removeCaCert() argument
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/assets/
Dgenerate-client-cert-chain.sh30 -out certs/ca.cert.pem
55 -out intermediate/certs/intermediate.cert.pem
74 -out user.cert.pem
80 "$WORKDIR"/user.cert.pem \
81 "$WORKDIR"/intermediate/certs/intermediate.cert.pem \
82 "$WORKDIR"/rootca/certs/ca.cert.pem \
83 > user-cert-chain.crt
91 -out user-cert-chain.key
Dca.conf19 certificate = $dir/certs/ca.cert.pem
48 certificate = $dir/certs/intermediate.cert.pem
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DKeyManagementTest.java36 import java.security.cert.CertificateException;
37 import java.security.cert.CertificateFactory;
38 import java.security.cert.X509Certificate;
39 import java.security.cert.Certificate;
89 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testCanInstallAndRemoveValidRsaKeypair() local
92 assertTrue(mDevicePolicyManager.installKeyPair(getWho(), privKey, cert, alias)); in testCanInstallAndRemoveValidRsaKeypair() local
113 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testCanInstallWithAutomaticAccess() local
116 assertTrue(mDevicePolicyManager.installKeyPair(getWho(), privKey, new Certificate[] {cert}, in testCanInstallWithAutomaticAccess()
118 assertTrue(mDevicePolicyManager.installKeyPair(getWho(), privKey, new Certificate[] {cert}, in testCanInstallWithAutomaticAccess()
172 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testGrantsDoNotPersistBetweenInstallations() local
[all …]
DCaCertManagementTest.java24 import java.security.cert.Certificate;
25 import java.security.cert.CertificateException;
26 import java.security.cert.CertificateFactory;
27 import java.security.cert.X509Certificate;
/cts/tests/tests/security/src/android/security/cts/
DConscryptIntermediateVerificationTest.java23 import java.security.cert.Certificate;
24 import java.security.cert.CertificateException;
25 import java.security.cert.X509Certificate;
26 import java.security.cert.CertificateFactory;
52 for (Certificate cert : certs) { in loadCertificates()
53 result.add((X509Certificate) cert); in loadCertificates()
DCertificateTest.java24 import java.security.cert.CertificateEncodingException;
25 import java.security.cert.CertificateException;
26 import java.security.cert.X509Certificate;
DX509CertChainBuildingTest.java30 import java.security.cert.CertificateException;
31 import java.security.cert.CertificateFactory;
32 import java.security.cert.X509Certificate;
/cts/tests/tests/net/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;
/cts/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/src/android/security/net/config/cts/
DResourceSourceTest.java25 import java.security.cert.Certificate;
26 import java.security.cert.CertificateFactory;
27 import java.security.cert.X509Certificate;
77 for (Certificate cert : factory.generateCertificates(is)) { in loadCertificates()
78 result.add((X509Certificate)cert); in loadCertificates()
95 for (X509Certificate cert : trustedCerts) { in getTrustedCertificates()
96 result.add(cert); in getTrustedCertificates()
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/
DCertInstallerReceiver.java27 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/tests/tests/net/src/org/apache/http/conn/ssl/cts/
DAbstractVerifierTest.java32 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/tests/tests/networksecurityconfig/networksecurityconfig-cleartext/src/android/security/net/config/cts/
DCleartextPermittedTest.java19 import java.security.cert.CertificateException;
20 import java.security.cert.X509Certificate;
/cts/tests/tests/networksecurityconfig/networksecurityconfig-basic-domain/src/android/security/net/config/cts/
DDomainConfigTest.java19 import java.security.cert.CertificateException;
20 import java.security.cert.X509Certificate;
/cts/tests/tests/webkit/src/android/webkit/cts/
DWebViewSslTest.java43 import java.security.cert.CertificateFactory;
44 import java.security.cert.X509Certificate;
504 SslCertificate cert = mWebView.getCertificate(); in testInsecureSiteClearsCertificate() local
505 assertNotNull(cert); in testInsecureSiteClearsCertificate()
506 assertEquals("Android", cert.getIssuedTo().getUName()); in testInsecureSiteClearsCertificate()
542 SslCertificate cert = mWebView.getCertificate(); in testSecureSiteSetsCertificate() local
543 assertNotNull(cert); in testSecureSiteSetsCertificate()
544 assertEquals("Android", cert.getIssuedTo().getUName()); in testSecureSiteSetsCertificate()
891 X509Certificate cert = (X509Certificate) certFactory.generateCertificate( in testClientCertIssuersReceivedCorrectly() local
896 assertEquals(cert.getIssuerDN(), principals[0]); in testClientCertIssuersReceivedCorrectly()
/cts/tests/tests/networksecurityconfig/src/android/security/net/config/cts/
DTestUtils.java27 import java.security.cert.Certificate;
28 import java.security.cert.CertificateFactory;
29 import java.security.cert.X509Certificate;
/cts/tests/tests/keystore/src/android/keystore/cts/
DAttestation.java24 import java.security.cert.CertificateParsingException;
25 import java.security.cert.X509Certificate;
DTestUtils.java42 import java.security.cert.Certificate;
43 import java.security.cert.CertificateFactory;
44 import java.security.cert.X509Certificate;
143 Certificate cert; in assertKeyStoreKeyPair() local
146 cert = keyStore.getCertificate(alias); in assertKeyStoreKeyPair()
154 assertEquals(cert, privEntry.getCertificate()); in assertKeyStoreKeyPair()
155 assertTrue("Certificate must be an X.509 certificate: " + cert.getClass(), in assertKeyStoreKeyPair()
156 cert instanceof X509Certificate); in assertKeyStoreKeyPair()
157 final X509Certificate x509Cert = (X509Certificate) cert; in assertKeyStoreKeyPair()
160 PublicKey keystorePublicKey = cert.getPublicKey(); in assertKeyStoreKeyPair()
[all …]
DRootOfTrust.java24 import java.security.cert.CertificateParsingException;
DAndroidKeyStoreTest.java48 import java.security.cert.Certificate;
49 import java.security.cert.CertificateFactory;
924 Certificate cert = generateCertificate(FAKE_RSA_CA_1); in testKeyStore_GetCertificateAlias_CAEntry_Unencrypted_Success() local
925 mKeyStore.setCertificateEntry(TEST_ALIAS_1, cert); in testKeyStore_GetCertificateAlias_CAEntry_Unencrypted_Success()
928 mKeyStore.getCertificateAlias(cert)); in testKeyStore_GetCertificateAlias_CAEntry_Unencrypted_Success()
1099 byte[] cert, byte[] ca) throws Exception { in assertPrivateKeyEntryEquals() argument
1104 Certificate expectedCert = certFact.generateCertificate(new ByteArrayInputStream(cert)); in assertPrivateKeyEntryEquals()
1287 final Certificate cert = generateCertificate(FAKE_RSA_CA_1); in testKeyStore_SetCertificate_CAExists_Overwrite_Unencrypted_Success() local
1290 mKeyStore.setCertificateEntry(TEST_ALIAS_1, cert); in testKeyStore_SetCertificate_CAExists_Overwrite_Unencrypted_Success()
1302 final Certificate cert = generateCertificate(FAKE_RSA_CA_1); in testKeyStore_SetCertificate_PrivateKeyExists_Unencrypted_Failure() local
[all …]
/cts/apps/CtsVerifier/
Dcreate_test_certs.sh67 -cert 'cacert.pem' \
/cts/tests/tests/net/src/android/net/wifi/cts/
DWifiEnterpriseConfigTest.java29 import java.security.cert.CertificateFactory;
30 import java.security.cert.X509Certificate;
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DKeyChainTest.java51 import java.security.cert.Certificate;
52 import java.security.cert.CertificateFactory;
53 import java.security.cert.X509Certificate;

12