Skip to content

Commit c5e6cac

Browse files
committed
tests: Skip RSA PKCS#1 wrapping/unwrapping with FIPS tokens
Signed-off-by: Jakub Jelen <[email protected]>
1 parent d97afd1 commit c5e6cac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cryptoki/tests/basic.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,11 @@ fn wrap_and_unwrap_key() {
998998
// open a session
999999
let session = pkcs11.open_rw_session(slot).unwrap();
10001000

1001+
if is_fips(&session) {
1002+
eprintln!("The RSA PKCS#1 encryption is not allowed in FIPS Mode");
1003+
return;
1004+
}
1005+
10011006
// log in the session
10021007
session
10031008
.login(UserType::User, Some(&AuthPin::new(USER_PIN.into())))

0 commit comments

Comments
 (0)