Skip to content

Commit dd25e7a

Browse files
committed
tests: Softokn (correctly) requires PublicExponent when generating a key
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
1 parent db9a7dd commit dd25e7a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cryptoki/tests/basic.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,7 +1988,9 @@ fn rsa_pkcs_oaep_empty() -> TestResult {
19881988
let session = pkcs11.open_rw_session(slot)?;
19891989
session.login(UserType::User, Some(&AuthPin::new(USER_PIN.into())))?;
19901990

1991+
let public_exponent: Vec<u8> = vec![0x01, 0x00, 0x01];
19911992
let pub_key_template = [
1993+
Attribute::PublicExponent(public_exponent),
19921994
Attribute::ModulusBits(2048.into()),
19931995
Attribute::Encrypt(true),
19941996
];
@@ -2027,7 +2029,9 @@ fn rsa_pkcs_oaep_with_data() -> TestResult {
20272029
let session = pkcs11.open_rw_session(slot)?;
20282030
session.login(UserType::User, Some(&AuthPin::new(USER_PIN.into())))?;
20292031

2032+
let public_exponent: Vec<u8> = vec![0x01, 0x00, 0x01];
20302033
let pub_key_template = [
2034+
Attribute::PublicExponent(public_exponent),
20312035
Attribute::ModulusBits(2048.into()),
20322036
Attribute::Encrypt(true),
20332037
];

0 commit comments

Comments
 (0)