Skip to content

Commit c8813b1

Browse files
committed
Lower Hash algorithm
On some TPM SHA-512 is not supported. Signed-off-by: Hugues de Valon <[email protected]>
1 parent 80ab977 commit c8813b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

e2e_tests/tests/per_provider/normal_tests/key_attributes.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ fn wrong_permitted_algorithm() {
160160
}
161161
let key_type = Type::RsaKeyPair;
162162
// Do not permit RSA PKCS 1v15 signing algorithm with SHA-256.
163+
#[allow(deprecated)]
163164
let permitted_algorithm =
164165
Algorithm::AsymmetricSignature(AsymmetricSignature::RsaPkcs1v15Sign {
165-
hash_alg: Hash::Sha512.into(),
166+
hash_alg: Hash::Sha1.into(),
166167
});
167168
let key_attributes = Attributes {
168169
lifetime: Lifetime::Persistent,
@@ -210,7 +211,7 @@ fn no_usage_flag_set() {
210211
let key_type = Type::RsaKeyPair;
211212
let permitted_algorithm =
212213
Algorithm::AsymmetricSignature(AsymmetricSignature::RsaPkcs1v15Sign {
213-
hash_alg: Hash::Sha512.into(),
214+
hash_alg: Hash::Sha256.into(),
214215
});
215216
let key_attributes = Attributes {
216217
lifetime: Lifetime::Persistent,

0 commit comments

Comments
 (0)