/cts/tools/utils/ |
D | certificates.py | 21 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/common/src/com/android/cts/devicepolicy/ |
D | TestCertificates.java | 25 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/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/ |
D | DirectDelegatedCertInstallerTest.java | 50 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 …]
|
D | CertInstallerReceiver.java | 29 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()
|
D | CertSelectionDelegateTest.java | 44 import java.security.cert.Certificate; 106 final Certificate cert = getCertificate(FAKE_RSA_1.caCertificate); in testCanSelectKeychainKeypairs() 165 private static Certificate getCertificate(byte[] cert) throws CertificateException { in getCertificate()
|
/cts/tests/tests/keystore/src/android/keystore/cts/ |
D | AttestKeyTest.java | 53 import java.security.cert.Certificate; 217 Certificate attestKeyCertChain[] = generateKeyPair(KEY_ALGORITHM_EC, in testEcAttestKey() 234 Certificate attestKeyCertChain[] = generateKeyPair(KEY_ALGORITHM_RSA, in testRsaAttestKey() 245 Certificate[] attestKeyCertChain) throws Exception { in testAttestKey() 247 final Certificate attestedEcKeyCertChain[] = generateKeyPair(KEY_ALGORITHM_EC, in testAttestKey() 263 final Certificate attestedRsaKeyCertChain[] = generateKeyPair(KEY_ALGORITHM_RSA, in testAttestKey() 282 private Certificate[] generateKeyPair(String algorithm, KeyGenParameterSpec spec) in generateKeyPair() 294 private void verifyCombinedChain(boolean useStrongBox, Certificate[] attestKeyCertChain, in verifyCombinedChain() 295 Certificate[] attestedKeyCertChain) throws GeneralSecurityException { in verifyCombinedChain() 296 Certificate[] combinedChain = Stream.concat(Arrays.stream(attestedKeyCertChain), in verifyCombinedChain() [all …]
|
D | AndroidKeyStoreTest.java | 66 import java.security.cert.Certificate; 791 private Certificate generateCertificate(byte[] fakeUser1) throws Exception { in generateCertificate() 798 new Certificate[] { in makeUserEcKey1() 805 new Certificate[] { in makeUserRsaKey1() 954 Certificate retrieved = mKeyStore.getCertificate(getTestAlias1()); in testKeyStore_GetCertificate_Single_Unencrypted_Success() 959 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_CA_1)); in testKeyStore_GetCertificate_Single_Unencrypted_Success() 976 Certificate cert = generateCertificate(FAKE_RSA_CA_1); in testKeyStore_GetCertificateAlias_CAEntry_Unencrypted_Success() 991 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_USER_1)); in testKeyStore_GetCertificateAlias_PrivateKeyEntry_Unencrypted_Success() 1002 Certificate actual = generateCertificate(FAKE_RSA_CA_1); in testKeyStore_GetCertificateAlias_CAEntry_WithPrivateKeyUsingCA_Unencrypted_Success() 1020 Certificate actual = f.generateCertificate(new ByteArrayInputStream(FAKE_RSA_CA_1)); in testKeyStore_GetCertificateAlias_NonExist_Empty_Unencrypted_Failure() [all …]
|
D | NoAttestKeyTest.java | 41 import java.security.cert.Certificate; 106 Certificate[] attestKeyCertChain = generateKeyPair(algorithm, in testAttestKeyFail() 111 Certificate[] attestedKeyCertChain = generateKeyPair(KEY_ALGORITHM_EC, in testAttestKeyFail() 132 private Certificate[] generateKeyPair(String algorithm, KeyGenParameterSpec spec) in generateKeyPair()
|
D | DeviceOwnerKeyManagementTest.java | 83 import java.security.cert.Certificate; 146 private void validateDeviceIdAttestationData(Certificate[] certs, in validateDeviceIdAttestationData() 246 private void validateDeviceIdAttestationDataUsingExtLib(Certificate[] certs, in validateDeviceIdAttestationDataUsingExtLib() 316 private void validateAttestationRecord(List<Certificate> attestation, byte[] providedChallenge) in validateAttestationRecord() 325 private void validateSignatureChain(List<Certificate> chain, PublicKey leafKey) in validateSignatureChain() 357 private Certificate[] generateKeyAndCheckAttestation( in generateKeyAndCheckAttestation() 417 List<Certificate> attestation = generated.getAttestationRecord(); in generateKeyAndCheckAttestation() 420 return attestation.toArray(new Certificate[0]); in generateKeyAndCheckAttestation() 485 Certificate[] attestation = generateKeyAndCheckAttestation( in assertAllVariantsOfDeviceIdAttestation() 588 Certificate []certificates = keyStore.getCertificateChain(keystoreAlias); in checkDeviceLocked()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CVE_2021_0341.java | 35 import java.security.cert.Certificate; 61 private Certificate[] certs = null; 64 public CVE_2021_0341_SSLSession(Certificate[] xc) in CVE_2021_0341_SSLSession() 69 for (Certificate cert : xc) { in CVE_2021_0341_SSLSession() 94 public Certificate[] getLocalCertificates() { in getLocalCertificates() 106 public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException { in getPeerCertificates()
|
D | ConscryptIntermediateVerificationTest.java | 24 import java.security.cert.Certificate; 47 Collection<? extends Certificate> certs; in loadCertificates() 59 for (Certificate cert : certs) { in loadCertificates()
|
D | CertBlocklistTest.java | 23 import java.security.cert.Certificate; 102 Collection<? extends Certificate> collection = factory.generateCertificates(is); in loadCertificates() 105 for (Certificate cert : collection) { in loadCertificates()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | KeyManagementTest.java | 68 import java.security.cert.Certificate; 94 private Certificate mFakeCert; 146 getWho(), mFakePrivKey, new Certificate[] {mFakeCert}, grant, true)) in testCanInstallWithAutomaticAccess() 162 private List<Certificate> loadCertificateChain(String assetName) throws Exception { in loadCertificateChain() 163 final Collection<Certificate> certs = loadCertificatesFromAsset(assetName); in loadCertificateChain() 164 final ArrayList<Certificate> certChain = new ArrayList(certs); in loadCertificateChain() 267 private void validateDeviceIdAttestationData(Certificate leaf, in validateDeviceIdAttestationData() 298 private void validateAttestationRecord(List<Certificate> attestation, byte[] providedChallenge) in validateAttestationRecord() 307 private void validateSignatureChain(List<Certificate> chain, PublicKey leafKey) in validateSignatureChain() 339 private Certificate generateKeyAndCheckAttestation( in generateKeyAndCheckAttestation() [all …]
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20230/src/android/security/cts/CVE_2022_20230/ |
D | PocPolicyManager.java | 24 import java.security.cert.Certificate; 42 public boolean installKeyPair(PrivateKey pkey, Certificate cert, String alias) { in installKeyPair()
|
D | DeviceTest.java | 44 import java.security.cert.Certificate; 321 Certificate cert = cf.generateCertificate(new ByteArrayInputStream(USER_CERT)); in testCVE_2022_20230()
|
/cts/tests/tests/apache-http/src/android/net/http/cts/ |
D | X509TrustManagerExtensionsTest.java | 22 import java.security.cert.Certificate; 51 for (Certificate cert : tm.getAcceptedIssuers()) { in testIsUserAddedCertificateDefaults()
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | CredentialManagementAppTest.java | 61 import java.security.cert.Certificate; 80 private static final Certificate CERTIFICATE = 82 private static final Certificate[] CERTIFICATES = new Certificate[]{CERTIFICATE}; 105 private static Certificate getCertificate(byte[] cert) { in getCertificate() 257 List<Certificate> certificates = Arrays.asList(CERTIFICATE); in setKeyPairCertificate_isCredentialManagementApp_success() 262 Certificate[] fetchedCerts = KeyChain.getCertificateChain(sContext, ALIAS); in setKeyPairCertificate_isCredentialManagementApp_success() 283 sDevicePolicyManager.installKeyPair(null, PRIVATE_KEY, new Certificate[]{CERTIFICATE}, in choosePrivateKeyAlias_isCredentialManagementApp_aliasSelected()
|
D | CaCertManagementTest.java | 58 import java.security.cert.Certificate; 123 private static final Certificate sCertificate; 284 Certificate certificate = CertificateFactory.getInstance("X.509").generateCertificate( in installKeyPair_installsKeyPair() 304 Certificate certificate = CertificateFactory.getInstance("X.509").generateCertificate( in installKeyPair_invalidAdmin_throwsException() 318 Certificate certificate = CertificateFactory.getInstance("X.509").generateCertificate( in removeKeyPair_removedKeyPair() 385 Certificate caCert = readCertificate(caBytes); in assertCaCertInstalledAndTrusted() 406 private static Certificate readCertificate(byte[] certBuffer) throws CertificateException { in readCertificate() 411 private boolean isCaCertListed(Certificate caCert) throws CertificateException { in isCaCertListed() 423 private void assertCaCertTrustStatusChange(Certificate caCert, boolean newStatus) in assertCaCertTrustStatusChange()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/certificates/ |
D | Certificates.java | 23 import java.security.cert.Certificate; 79 public Certificate generateCertificate(byte[] cert) { in generateCertificate()
|
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | KeystoreAttestationDeviceInfo.java | 49 import java.security.cert.Certificate; 135 Certificate[] certificates = keystore.getCertificateChain(testAlias); in loadCertAndCollectAttestation() 142 for (Certificate certificate : certificates) { in loadCertAndCollectAttestation()
|
/cts/tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/res/raw/ |
D | make_certs.go | 41 …mustMakeCertChain(caName string, eeKey, caKey *rsa.PrivateKey) (eeCert, caCert *x509.Certificate) { 51 caTemplate := x509.Certificate{ 69 eeTemplate := x509.Certificate{
|
/cts/tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/src/android/security/net/config/cts/ |
D | DownloadManagerTest.java | 46 import java.security.cert.Certificate; 139 Collection<? extends Certificate> certs; in bindTLSServer() 145 for (Certificate cert : certs) { in bindTLSServer()
|
/cts/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/src/android/security/net/config/cts/ |
D | ResourceSourceTest.java | 32 import java.security.cert.Certificate; 93 for (Certificate cert : factory.generateCertificates(is)) { in loadCertificates()
|
/cts/tests/tests/networksecurityconfig/src/android/security/net/config/cts/ |
D | TestUtils.java | 31 import java.security.cert.Certificate; 86 for (Certificate c : factory.generateCertificates(is)) { in loadCertificates()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | AdminActionBookkeepingTest.java | 33 import java.security.cert.Certificate; 147 final Certificate cert = CertificateFactory.getInstance("X.509") in testGetPolicyInstalledCaCerts()
|