diff options
author | Rajesh Nyamagoud <nyamagoud@google.com> | 2023-04-01 01:32:32 +0000 |
---|---|---|
committer | Rajesh Nyamagoud <nyamagoud@google.com> | 2023-05-23 19:28:24 +0000 |
commit | 28abde6189193b948a5dbf952a2223af5f9dbb61 (patch) | |
tree | 1d9fb21d67b9bc2b93bb20412bed101e2ab21c51 /keystore2/test_utils | |
parent | 6ff734224edba75e0937b43b6dc1356d0840376b (diff) | |
download | security-28abde6189193b948a5dbf952a2223af5f9dbb61.tar.gz |
Adding tests to verify `EVP_PKEY_from_keystore2` API [Keystore2-engine].
1. Generate RSA key and grant it to a user. In user context load the
key using `EVP_PKEY_from_keystore` and perform sign and verify
opeearions.
[keystore2_perofrm_crypto_op_using_keystore2_engine_rsa_key_success]
2. Generate EC key and grant it to a user. In user context load the
key using `EVP_PKEY_from_keystore` and perform sign and verify
operations.
[keystore2_perofrm_crypto_op_using_keystore2_engine_ec_key_success]
3. Generate RSA key and grant it to a user. Re-encode the certificate
as PEM and update the certificate using `updateSubcomponents`.
In user context load the key using `EVP_PKEY_from_keystore` and
perform sign and verify operations.
Bug: 201343811
Test: atest keystore2_client_tests
Change-Id: I7dafd598f4198e11103cd11695b2f67636f24755
Diffstat (limited to 'keystore2/test_utils')
-rw-r--r-- | keystore2/test_utils/key_generations.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/keystore2/test_utils/key_generations.rs b/keystore2/test_utils/key_generations.rs index e4c4968f..3422ce86 100644 --- a/keystore2/test_utils/key_generations.rs +++ b/keystore2/test_utils/key_generations.rs @@ -299,6 +299,9 @@ pub enum Error { /// Error code to indicate error in ASN.1 DER-encoded data creation. #[error("Failed to create and encode ASN.1 data.")] DerEncodeFailed, + /// Error code to indicate error while using keystore-engine API. + #[error("Failed to perform crypto op using keystore-engine APIs.")] + Keystore2EngineOpFailed, } /// Keystore2 error mapping. |