Skip to content

Commit 41ff9f5

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

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

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

0 commit comments

Comments
 (0)