/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | FakeKeys.java | 37 public static final byte[] privateKey = { field in FakeKeys.FAKE_RSA_1 292 public static final byte[] privateKey = { field in FakeKeys.FAKE_DSA_1
|
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/ |
D | PreSelectedKeyAccessTest.java | 44 PrivateKey privateKey = KeyChain.getPrivateKey(getContext(), PRE_SELECTED_ALIAS); in testAccessingPreSelectedAliasExpectingSuccess() local 45 assertThat(privateKey).isNotNull(); in testAccessingPreSelectedAliasExpectingSuccess() 50 sign.initSign(privateKey); in testAccessingPreSelectedAliasExpectingSuccess()
|
D | CertSelectionDelegateTest.java | 105 final PrivateKey privKey = getPrivateKey(FAKE_RSA_1.privateKey, "RSA"); in testCanSelectKeychainKeypairs()
|
/cts/tests/tests/keystore/src/android/keystore/cts/ |
D | RSACipherTest.java | 84 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus() local 97 cipher.init(Cipher.DECRYPT_MODE, privateKey); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus() 118 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus() local 127 cipher.init(Cipher.DECRYPT_MODE, privateKey); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus() 239 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingDecryptionFailsWithCiphertextOneByteLongerThanModulus() local 240 BigInteger modulus = ((RSAKey) privateKey).getModulus(); in testNoPaddingDecryptionFailsWithCiphertextOneByteLongerThanModulus() 248 cipher.init(Cipher.DECRYPT_MODE, privateKey); in testNoPaddingDecryptionFailsWithCiphertextOneByteLongerThanModulus() 272 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingWithZeroMessage() local 282 cipher.init(Cipher.DECRYPT_MODE, privateKey); in testNoPaddingWithZeroMessage()
|
D | RSASignatureTest.java | 77 PrivateKey privateKey = keyPair.getKeystoreBackedKeyPair().getPrivate(); in testMaxMessageSizeWhenNoDigestUsed() local 89 signature.initSign(privateKey); in testMaxMessageSizeWhenNoDigestUsed() 99 signature.initSign(privateKey); in testMaxMessageSizeWhenNoDigestUsed()
|
D | ImportWrappedKeyTest.java | 331 PrivateKey privateKey = kp.getPrivate(); in testKeyStore_ImportWrappedKey_RSA() local 333 assertEquals(privateKey.getFormat(), "PKCS#8"); in testKeyStore_ImportWrappedKey_RSA() 335 byte[] keyMaterial = privateKey.getEncoded(); in testKeyStore_ImportWrappedKey_RSA() 410 PrivateKey privateKey = kp.getPrivate(); in testKeyStore_ImportWrappedKey_EC() local 412 assertEquals(privateKey.getFormat(), "PKCS#8"); in testKeyStore_ImportWrappedKey_EC() 414 byte[] keyMaterial = privateKey.getEncoded(); in testKeyStore_ImportWrappedKey_EC()
|
D | SignatureTest.java | 626 PrivateKey privateKey = key.getOriginalKeyPair().getPrivate(); in testSignatureGeneratedByHighestPriorityProviderVerifiesByAndroidKeyStore() local 632 signature.initSign(privateKey); in testSignatureGeneratedByHighestPriorityProviderVerifiesByAndroidKeyStore() 1159 PrivateKey privateKey = TestUtils.importIntoAndroidKeyStore( in assertInitSignSucceeds() local 1164 signature.initSign(privateKey); in assertInitSignSucceeds() 1192 PrivateKey privateKey = TestUtils.importIntoAndroidKeyStore( in assertInitSignThrowsInvalidKeyException() local 1198 signature.initSign(privateKey); in assertInitSignThrowsInvalidKeyException() 1304 PrivateKey privateKey, in generateSignatureFedUsingFixedSizeChunks() argument 1308 signature.initSign(privateKey); in generateSignatureFedUsingFixedSizeChunks()
|
D | KeyStoreTest.java | 345 … public static void setPrivateKeyNoPassword(KeyStore ks, String alias, PrivateKeyEntry privateKey) in setPrivateKeyNoPassword() argument 347 ks.setKeyEntry(alias, privateKey.getPrivateKey(), null, privateKey.getCertificateChain()); in setPrivateKeyNoPassword() 357 PrivateKeyEntry privateKey) in setPrivateKey() argument 360 privateKey.getPrivateKey(), in setPrivateKey() 362 privateKey.getCertificateChain()); in setPrivateKey() 373 PrivateKeyEntry privateKey) in setPrivateKeyBytes() argument 376 privateKey.getPrivateKey().getEncoded(), in setPrivateKeyBytes() 377 privateKey.getCertificateChain()); in setPrivateKeyBytes() 434 PrivateKeyEntry privateKey = (PrivateKeyEntry) actual; in assertPrivateKey() local 435 assertEquals(getPrivateKey().getPrivateKey(), privateKey.getPrivateKey()); in assertPrivateKey() [all …]
|
D | AndroidKeyStoreTest.java | 2039 PrivateKey privateKey = (PrivateKey) ks.getKey(alias, null); in testKeyStore_Encrypting_RSA_NONE_NOPADDING() local 2040 assertNotNull(privateKey); in testKeyStore_Encrypting_RSA_NONE_NOPADDING() 2043 String cipher = privateKey.getAlgorithm() + "/NONE/NOPADDING"; in testKeyStore_Encrypting_RSA_NONE_NOPADDING() 2046 encrypt.init(Cipher.ENCRYPT_MODE, privateKey); in testKeyStore_Encrypting_RSA_NONE_NOPADDING() 2735 PrivateKey privateKey = generatePrivateKey("RSA", FAKE_RSA_KEY_1); in createLargeNumberOfKeyStoreEntryAliases() local 2745 new PrivateKeyEntry(privateKey, new Certificate[]{cert}), protectionParams); in createLargeNumberOfKeyStoreEntryAliases()
|
D | DeviceOwnerKeyManagementTest.java | 124 byte[] signDataWithKey(String algoIdentifier, PrivateKey privateKey) throws Exception { in signDataWithKey() argument 127 sign.initSign(privateKey); in signDataWithKey()
|
D | KeyPairGeneratorTest.java | 1955 PrivateKey privateKey, in assertUsableForTLSPeerAuthentication() argument 1971 TestKeyManager.wrap(new MyKeyManager(privateKey, x509CertificateChain)) in assertUsableForTLSPeerAuthentication() 1976 if ("EC".equalsIgnoreCase(privateKey.getAlgorithm())) { in assertUsableForTLSPeerAuthentication() 1981 } else if ("RSA".equalsIgnoreCase(privateKey.getAlgorithm())) { in assertUsableForTLSPeerAuthentication() 2008 fail("Unsupported key algorithm: " + privateKey.getAlgorithm()); in assertUsableForTLSPeerAuthentication()
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | CaCertManagementTest.java | 281 PrivateKey privateKey = KeyFactory.getInstance("RSA").generatePrivate( in installKeyPair_installsKeyPair() local 291 sDeviceState.dpc().componentName(), privateKey, certificate, ALIAS); in installKeyPair_installsKeyPair() 301 PrivateKey privateKey = KeyFactory.getInstance("RSA").generatePrivate( in installKeyPair_invalidAdmin_throwsException() local 310 sDeviceState.dpc().componentName(), privateKey, certificate, ALIAS)); in installKeyPair_invalidAdmin_throwsException() 315 PrivateKey privateKey = KeyFactory.getInstance("RSA").generatePrivate( in removeKeyPair_removedKeyPair() local 324 sDeviceState.dpc().componentName(), privateKey, certificate, ALIAS); in removeKeyPair_removedKeyPair() local
|
D | KeyManagementTest.java | 82 TestApis.certificates().generateRSAPrivateKey(FakeKeys.FAKE_RSA_1.privateKey); 373 final PrivateKey privateKey = in getPrivateKey_aliasIsGranted_returnPrivateKey() local 376 assertThat(privateKey).isNotNull(); in getPrivateKey_aliasIsGranted_returnPrivateKey() 377 assertThat(privateKey.getAlgorithm()).isEqualTo( in getPrivateKey_aliasIsGranted_returnPrivateKey() 671 private byte[] signDataWithKey(String algoIdentifier, PrivateKey privateKey) throws Exception { in signDataWithKey() argument 674 sign.initSign(privateKey); in signDataWithKey()
|
D | CredentialManagementAppTest.java | 79 getPrivateKey(FakeKeys.FAKE_RSA_1.privateKey, "RSA"); 393 private byte[] signDataWithKey(String algoIdentifier, PrivateKey privateKey) throws Exception { in signDataWithKey() argument 396 sign.initSign(privateKey); in signDataWithKey()
|
D | WifiTest.java | 109 TestApis.certificates().generateRSAPrivateKey(FakeKeys.FAKE_RSA_1.privateKey);
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
D | KeyChainTestActivity.java | 205 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTestActivity.this, alias); in alias() local 206 if (privateKey == null) { in alias() 213 sign.initSign(privateKey); in alias()
|
/cts/tests/tests/keystore/src/android/keystore/cts/util/ |
D | TestUtils.java | 286 public static void assertKeyPairSelfConsistent(PublicKey publicKey, PrivateKey privateKey) { in assertKeyPairSelfConsistent() argument 288 assertNotNull(privateKey); in assertKeyPairSelfConsistent() 289 assertEquals(publicKey.getAlgorithm(), privateKey.getAlgorithm()); in assertKeyPairSelfConsistent() 296 + privateKey.getClass().getName(), in assertKeyPairSelfConsistent() 297 privateKey instanceof ECKey); in assertKeyPairSelfConsistent() 300 ((ECKey) publicKey).getParams(), ((ECKey) privateKey).getParams()); in assertKeyPairSelfConsistent() 306 + privateKey.getClass().getName(), in assertKeyPairSelfConsistent() 307 privateKey instanceof RSAKey); in assertKeyPairSelfConsistent() 309 ((RSAKey) publicKey).getModulus(), ((RSAKey) privateKey).getModulus()); in assertKeyPairSelfConsistent() 324 + privateKey.getClass().getName(), in assertKeyPairSelfConsistent() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/biometrics/ |
D | Utils.java | 108 PrivateKey privateKey = ((KeyStore.PrivateKeyEntry) entry).getPrivateKey(); in initSignature() local 114 signature.initSign(privateKey); in initSignature()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/ |
D | CredentialManagementAppActivity.java | 274 final PrivateKey privateKey = KeyChain.getPrivateKey( in getPrivateKeyAndSignData() local 280 sign.initSign(privateKey); in getPrivateKeyAndSignData()
|
D | KeyChainTest.java | 486 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTest.this, alias); in getPrivateKey() local 487 Log.d(TAG, "privateKey = " + privateKey); in getPrivateKey() 488 return privateKey; in getPrivateKey()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | KeyManagementTest.java | 123 mFakePrivKey = getPrivateKey(FAKE_RSA_1.privateKey, "RSA"); in setUp() 173 byte[] signDataWithKey(String algoIdentifier, PrivateKey privateKey) throws Exception { in signDataWithKey() argument 176 sign.initSign(privateKey); in signDataWithKey()
|