Use no_auth_required in keystore2_test_unlocked_device_required()
Since keystore2_test_unlocked_device_required() does not want user
authentication to be required for its key, add the NO_AUTH_REQUIRED
parameter. This makes the parameters consistent with what the Java APIs
use. Neither Keystore itself nor the reference implementation of
KeyMint actually care about NO_AUTH_REQUIRED because it is implied by
other parameters, but maybe other implementations of KeyMint care.
Bug: 336695416
Bug: 353162976
Bug: 354094581
Bug: 355586255
Bug: 356750530
Bug: 357732768
Bug: 358266831
Test: atest keystore2_client_tests
Change-Id: Iec9bfa6bb2c1b3fbc5a7ba999dabf9a4371e1ba9
diff --git a/keystore2/tests/user_auth.rs b/keystore2/tests/user_auth.rs
index 38cdf6d..4e3c692 100644
--- a/keystore2/tests/user_auth.rs
+++ b/keystore2/tests/user_auth.rs
@@ -141,6 +141,7 @@
let sec_level = ks2.getSecurityLevel(SecurityLevel::TRUSTED_ENVIRONMENT).unwrap();
let params = AuthSetBuilder::new()
+ .no_auth_required()
.unlocked_device_required()
.algorithm(Algorithm::EC)
.purpose(KeyPurpose::SIGN)