Skip to content

Commit d97afd1

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

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
@@ -398,6 +398,11 @@ fn encrypt_decrypt() -> TestResult {
398398
// open a session
399399
let session = pkcs11.open_rw_session(slot)?;
400400

401+
if is_fips(&session) {
402+
eprintln!("The RSA PKCS#1 encryption is not allowed in FIPS Mode");
403+
return Ok(());
404+
}
405+
401406
// log in the session
402407
session.login(UserType::User, Some(&AuthPin::new(USER_PIN.into())))?;
403408

0 commit comments

Comments
 (0)