Specify KeyMint EC keys by curve not size
Future addition of extra curves means that key size is not enough to identify the particular EC curve required. Use the EcCurve enum instead. Test: VtsHalRemotelyProvisionedComponentTargetTest Change-Id: Ia6b7d86a387cfc06db05e4ba6ff8f331e9c6345f
This commit is contained in:
parent
0531c94771
commit
915ce253a8
3 changed files with 1 additions and 7 deletions
|
@ -222,7 +222,7 @@ TEST_P(GenerateKeyTests, generateAndUseEcdsaP256Key_prodMode) {
|
|||
// Generate an ECDSA key that is attested by the generated P256 keypair.
|
||||
AuthorizationSet keyDesc = AuthorizationSetBuilder()
|
||||
.Authorization(TAG_NO_AUTH_REQUIRED)
|
||||
.EcdsaSigningKey(256)
|
||||
.EcdsaSigningKey(EcCurve::P_256)
|
||||
.AttestationChallenge("foo")
|
||||
.AttestationApplicationId("bar")
|
||||
.Digest(Digest::NONE)
|
||||
|
|
|
@ -161,11 +161,6 @@ AuthorizationSetBuilder& AuthorizationSetBuilder::RsaEncryptionKey(uint32_t key_
|
|||
return EncryptionKey();
|
||||
}
|
||||
|
||||
AuthorizationSetBuilder& AuthorizationSetBuilder::EcdsaSigningKey(uint32_t key_size) {
|
||||
EcdsaKey(key_size);
|
||||
return SigningKey();
|
||||
}
|
||||
|
||||
AuthorizationSetBuilder& AuthorizationSetBuilder::EcdsaSigningKey(EcCurve curve) {
|
||||
EcdsaKey(curve);
|
||||
return SigningKey();
|
||||
|
|
|
@ -281,7 +281,6 @@ class AuthorizationSetBuilder : public AuthorizationSet {
|
|||
|
||||
AuthorizationSetBuilder& RsaSigningKey(uint32_t key_size, uint64_t public_exponent);
|
||||
AuthorizationSetBuilder& RsaEncryptionKey(uint32_t key_size, uint64_t public_exponent);
|
||||
AuthorizationSetBuilder& EcdsaSigningKey(uint32_t key_size);
|
||||
AuthorizationSetBuilder& EcdsaSigningKey(EcCurve curve);
|
||||
AuthorizationSetBuilder& AesEncryptionKey(uint32_t key_size);
|
||||
AuthorizationSetBuilder& TripleDesEncryptionKey(uint32_t key_size);
|
||||
|
|
Loading…
Reference in a new issue