Skip to content

Commit

Permalink
Make wrong_permitted_algorithm test use a non-deprecated Hash
Browse files Browse the repository at this point in the history
Currently, the wrong_permitted_algorithm test checks if, creating
a key that uses sha1, that key is rejected when calling
sign_with_rsa_sha256. However, as sha1 is deprecated, there is
currently an error when creating the key for the test.

 * Change the key generation to use sha512 instead.

Signed-off-by: Tomás González <[email protected]>
  • Loading branch information
tgonzalezorlandoarm committed Sep 1, 2023
1 parent e2a342e commit bb65c21
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions e2e_tests/tests/per_provider/normal_tests/key_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,9 @@ fn wrong_permitted_algorithm() {
}
let key_type = Type::RsaKeyPair;
// Do not permit RSA PKCS 1v15 signing algorithm with SHA-256.
#[allow(deprecated)]
let permitted_algorithm =
Algorithm::AsymmetricSignature(AsymmetricSignature::RsaPkcs1v15Sign {
hash_alg: Hash::Sha1.into(),
hash_alg: Hash::Sha512.into(),
});
let mut usage_flags: UsageFlags = Default::default();
let _ = usage_flags.set_sign_hash();
Expand Down

0 comments on commit bb65c21

Please sign in to comment.