Skip to content

Commit 5ae9853

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

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

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

0 commit comments

Comments
 (0)