Skip to content

Commit a8d4939

Browse files
committed
tests: Skip RSA PKCS#1 wrapping/unwrapping with FIPS tokens
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
1 parent 41ff9f5 commit a8d4939

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
@@ -1283,6 +1283,11 @@ fn wrap_and_unwrap_key() {
12831283
// open a session
12841284
let session = pkcs11.open_rw_session(slot).unwrap();
12851285

1286+
if is_fips(&session) {
1287+
eprintln!("The RSA PKCS#1 encryption is not allowed in FIPS Mode");
1288+
return;
1289+
}
1290+
12861291
// log in the session
12871292
session
12881293
.login(UserType::User, Some(&AuthPin::new(USER_PIN.into())))

0 commit comments

Comments
 (0)