Home
last modified time | relevance | path

Searched refs:Certificate (Results 1 – 25 of 35) sorted by relevance

12

/cts/tools/utils/
Dcertificates.py21 class Certificate(object): class
49 return Certificate(cert, key)
77 return Certificate(cert, key)
81 a = Certificate.create("Root A")
82 a_sha1 = Certificate.create("Root A", key=a.key, digest="sha1")
83 b = Certificate.create("Root B")
84 a_to_b = Certificate.create("Root A", b, a.key)
85 b_to_a = Certificate.create("Root B", a, b.key)
86 leaf1 = Certificate.create("Leaf", a)
87 intermediate_a = Certificate.create("intermediate", a)
[all …]
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/
DDirectDelegatedCertInstallerTest.java50 import java.security.cert.Certificate;
73 private Certificate mTestCertificate;
100 final Certificate caCert = CertificateFactory.getInstance("X.509") in testCaCertsOperations()
133 assertThat(mDpm.installKeyPair(null, mTestPrivateKey, new Certificate[]{mTestCertificate}, in testInstallKeyPair()
213 mDpm.installKeyPair(null, mTestPrivateKey, new Certificate[]{mTestCertificate}, TEST_ALIAS, in testHasKeyPair_Installed()
220 mDpm.installKeyPair(null, mTestPrivateKey, new Certificate[]{mTestCertificate}, TEST_ALIAS, in testHasKeyPair_Removed()
229 mDpm.installKeyPair(null, mTestPrivateKey, new Certificate[]{mTestCertificate}, TEST_ALIAS, in testGetKeyPairGrants_Empty()
237 mDpm.installKeyPair(null, mTestPrivateKey, new Certificate[]{mTestCertificate}, TEST_ALIAS, in testGetKeyPairGrants_NonEmpty()
245 mDpm.installKeyPair(null, mTestPrivateKey, new Certificate[]{mTestCertificate}, in testIsWifiGrant_default()
252 mDpm.installKeyPair(null, mTestPrivateKey, new Certificate[]{mTestCertificate}, in testIsWifiGrant_allowed()
[all …]
DCertInstallerReceiver.java29 import java.security.cert.Certificate;
131 Certificate certificate = CertificateFactory.getInstance("X.509") in onReceive()
170 Certificate certificateToMatch = readCertificate(toMatch); in containsCertificate()
172 Certificate cert = readCertificate(certBuffer); in containsCertificate()
180 private static Certificate readCertificate(byte[] certBuffer) throws CertificateException { in readCertificate()
DCertSelectionDelegateTest.java43 import java.security.cert.Certificate;
105 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testCanSelectKeychainKeypairs()
164 private static Certificate getCertificate(byte[] cert) throws CertificateException { in getCertificate()
/cts/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/
DTestCertificates.java25 import java.security.cert.Certificate;
117 public static Certificate userCertFromString(String cert) throws Exception { in userCertFromString()
122 public static Certificate getUserCert() throws Exception { in getUserCert()
126 public static Certificate caCertFromString(String cert) throws Exception { in caCertFromString()
132 public static Certificate getCaCert() throws Exception { in getCaCert()
/cts/tests/tests/keystore/src/android/keystore/cts/
DAndroidKeyStoreTest.java44 import java.security.cert.Certificate;
766 private Certificate generateCertificate(byte[] fakeUser1) throws Exception { in generateCertificate()
773 new Certificate[] { in makeUserEcKey1()
780 new Certificate[] { in makeUserRsaKey1()
914 Certificate retrieved = mKeyStore.getCertificate(TEST_ALIAS_1); in testKeyStore_GetCertificate_Single_Unencrypted_Success()
919 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_CA_1)); in testKeyStore_GetCertificate_Single_Unencrypted_Success()
934 Certificate cert = generateCertificate(FAKE_RSA_CA_1); in testKeyStore_GetCertificateAlias_CAEntry_Unencrypted_Success()
948 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_USER_1)); in testKeyStore_GetCertificateAlias_PrivateKeyEntry_Unencrypted_Success()
958 Certificate actual = generateCertificate(FAKE_RSA_CA_1); in testKeyStore_GetCertificateAlias_CAEntry_WithPrivateKeyUsingCA_Unencrypted_Success()
975 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_CA_1)); in testKeyStore_GetCertificateAlias_NonExist_Empty_Unencrypted_Failure()
[all …]
DAttestKeyTest.java48 import java.security.cert.Certificate;
86 Certificate attestKeyCertChain[] = generateKeyPair(KEY_ALGORITHM_EC, in testEcAttestKey()
93 Certificate attestedKeyCertChain[] = generateKeyPair(KEY_ALGORITHM_EC, in testEcAttestKey()
184 private Certificate[] generateKeyPair(String algorithm, KeyGenParameterSpec spec) in generateKeyPair()
196 private void verifyCombinedChain(Certificate[] attestKeyCertChain, in verifyCombinedChain()
197 Certificate[] attestedKeyCertChain) throws GeneralSecurityException { in verifyCombinedChain()
198 Certificate[] combinedChain = Stream in verifyCombinedChain()
201 .toArray(Certificate[]::new); in verifyCombinedChain()
204 for (Certificate cert : combinedChain) { in verifyCombinedChain()
209 verifyCertificateChain((Certificate[]) combinedChain, false /* expectStrongBox */); in verifyCombinedChain()
DKeyAttestationTest.java93 import java.security.cert.Certificate;
251 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testEcAttestation_NoChallenge()
294 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testEcAttestation_DeviceLocked()
326 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testAttestationKmVersionMatchesFeatureVersion()
380 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testAttestationKmVersionMatchesFeatureVersionStrongBox()
525 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testRsaAttestation_NoChallenge()
567 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testRsaAttestation_DeviceLocked()
691 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testRsaAttestation()
751 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testEcAttestation()
1324 public static void verifyCertificateChain(Certificate[] certChain, boolean expectStrongBox) in verifyCertificateChain()
DPerformanceTestBase.java32 import java.security.cert.Certificate;
343 Certificate[] getCertificateChain() throws Exception { in getCertificateChain()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DKeyManagementTest.java67 import java.security.cert.Certificate;
94 private Certificate mFakeCert;
168 getWho(), mFakePrivKey, new Certificate[] {mFakeCert}, grant, true)) in testCanInstallWithAutomaticAccess()
172 getWho(), mFakePrivKey, new Certificate[] {mFakeCert}, withhold, false)) in testCanInstallWithAutomaticAccess()
191 private List<Certificate> loadCertificateChain(String assetName) throws Exception { in loadCertificateChain()
192 final Collection<Certificate> certs = loadCertificatesFromAsset(assetName); in loadCertificateChain()
193 final ArrayList<Certificate> certChain = new ArrayList(certs); in loadCertificateChain()
205 final Certificate[] certChain = loadCertificateChain("user-cert-chain.crt") in testCanInstallCertChain()
206 .toArray(new Certificate[0]); in testCanInstallCertChain()
235 getWho(), mFakePrivKey, new Certificate[] {mFakeCert}, alias, true)) in testGrantsDoNotPersistBetweenInstallations()
[all …]
DCaCertManagementTest.java28 import java.security.cert.Certificate;
141 Certificate caCert = readCertificate(caBytes); in isCaCertInstalledAndTrusted()
189 private static Certificate readCertificate(byte[] certBuffer) throws CertificateException { in readCertificate()
DWifiTest.java32 import java.security.cert.Certificate;
146 new Certificate[]{getUserCert()}, TEST_ALIAS, in prepareTestKeyPair()
/cts/hostsidetests/devicepolicy/app/DelegateApp/src/com/android/cts/delegate/
DCertInstallDelegateTest.java34 import java.security.cert.Certificate;
84 Certificate certificate = CertificateFactory.getInstance("X.509").generateCertificate( in testCanAccessApis()
96 Certificate certificateToMatch = readCertificate(toMatch); in containsCertificate()
98 Certificate cert = readCertificate(certBuffer); in containsCertificate()
106 private static Certificate readCertificate(byte[] certBuffer) throws CertificateException { in readCertificate()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DCredentialManagementAppTest.java62 import java.security.cert.Certificate;
75 private static final Certificate CERTIFICATE =
77 private static final Certificate[] CERTIFICATES = new Certificate[]{CERTIFICATE};
238 List<Certificate> certificates = Arrays.asList(CERTIFICATE); in setKeyPairCertificate_isCredentialManagementApp_success()
242 Certificate[] fetchedCerts = KeyChain.getCertificateChain(CONTEXT, ALIAS); in setKeyPairCertificate_isCredentialManagementApp_success()
261 mDpm.installKeyPair(null, PRIVATE_KEY, new Certificate[]{CERTIFICATE}, ALIAS, 0); in choosePrivateKeyAlias_isCredentialManagementApp_aliasSelected()
405 private static Certificate getCertificate(byte[] cert) { in getCertificate()
/cts/tests/tests/security/src/android/security/cts/
DConscryptIntermediateVerificationTest.java24 import java.security.cert.Certificate;
41 Collection<? extends Certificate> certs; in loadCertificates()
53 for (Certificate cert : certs) { in loadCertificates()
DCertBlacklistTest.java24 import java.security.cert.Certificate;
92 Collection<? extends Certificate> collection = factory.generateCertificates(is); in loadCertificates()
95 for (Certificate cert : collection) { in loadCertificates()
DCertificateTest.java28 import java.security.cert.Certificate;
141 Certificate cert = certFactory.generateCertificate(fis); in loadCertsFromDisk()
/cts/tests/tests/apache-http/src/android/net/http/cts/
DX509TrustManagerExtensionsTest.java22 import java.security.cert.Certificate;
51 for (Certificate cert : tm.getAcceptedIssuers()) { in testIsUserAddedCertificateDefaults()
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/
DAdminActionBookkeepingTest.java26 import java.security.cert.Certificate;
64 final Certificate cert = CertificateFactory.getInstance("X.509") in testGetPolicyInstalledCaCerts()
/cts/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/src/android/security/net/config/cts/
DResourceSourceTest.java24 import java.security.cert.Certificate;
76 for (Certificate cert : factory.generateCertificates(is)) { in loadCertificates()
/cts/tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/src/android/security/net/config/cts/
DDownloadManagerTest.java42 import java.security.cert.Certificate;
135 Collection<? extends Certificate> certs; in bindTLSServer()
141 for (Certificate cert : certs) { in bindTLSServer()
/cts/tests/tests/networksecurityconfig/src/android/security/net/config/cts/
DTestUtils.java27 import java.security.cert.Certificate;
85 for (Certificate c : factory.generateCertificates(is)) { in loadCertificates()
/cts/tests/tests/content/src/android/content/pm/cts/
DChecksumsTest.java88 import java.security.cert.Certificate;
537 final Certificate certificate = readCertificate(); in testInstallerSignedChecksumsTrustAll()
572 final Certificate installerCertificate = getInstallerCertificate(); in testInstallerChecksumsTrustAll()
606 final List<Certificate> signatures = convertSignaturesToCertificates( in testInstallerChecksumsTrustInstaller()
638 final List<Certificate> signatures = convertSignaturesToCertificates( in testInstallerChecksumsTrustWrongInstaller()
674 final Certificate installerCertificate = getInstallerCertificate(); in testInstallerChecksumsUpdate()
856 final Certificate certificate = readCertificate(); in testInstallerSignedChecksumsUpdate()
1017 final Certificate installerCertificate = getInstallerCertificate(); in testInstallerChecksumsIncremental()
1060 final Certificate certificate = readCertificate(); in testInstallerSignedChecksumsIncremental()
1136 private List<Certificate> convertSignaturesToCertificates(Signature[] signatures) { in convertSignaturesToCertificates()
[all …]
/cts/common/device-side/bedstead/dpmwrapper/src/main/java/com/android/bedstead/dpmwrapper/
DDataFormatter.java31 import java.security.cert.Certificate;
146 if (value instanceof Certificate) { in addArg()
352 parameterType = Certificate.class; in getArg()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DAdminActionBookkeepingTest.java33 import java.security.cert.Certificate;
232 final Certificate cert = CertificateFactory.getInstance("X.509") in testGetPolicyInstalledCaCerts()

12