Skip to content

Commit 5b5a42e

Browse files
committed
tests: Use more complex pins to make Kryoptic FIPS module happy
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
1 parent e2ecc76 commit 5b5a42e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cryptoki/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ pkcs11.initialize(CInitializeArgs::OsThreads)?;
5252
let slot = pkcs11.get_slots_with_token()?[0];
5353

5454
// initialize a test token
55-
let so_pin = AuthPin::new("abcdef".into());
55+
let so_pin = AuthPin::new("abcdef654321".into());
5656
pkcs11.init_token(slot, &so_pin, "Test Token")?;
5757

58-
let user_pin = AuthPin::new("fedcba".into());
58+
let user_pin = AuthPin::new("fedcba123456".into());
5959

6060
// initialize user PIN
6161
{

cryptoki/src/session/object_management.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl Session {
410410
/// let slot = pkcs11.get_slots_with_token().unwrap().remove(0);
411411
///
412412
/// let session = pkcs11.open_ro_session(slot).unwrap();
413-
/// session.login(UserType::User, Some(&AuthPin::new("fedcba".into())));
413+
/// session.login(UserType::User, Some(&AuthPin::new("fedcba123456".into())));
414414
///
415415
/// let empty_attrib= vec![];
416416
/// if let Some(object) = session.find_objects(&empty_attrib).unwrap().first() {

cryptoki/tests/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,7 @@ fn generate_random_test() -> TestResult {
15151515
#[test]
15161516
#[serial]
15171517
fn set_pin_test() -> TestResult {
1518-
let new_user_pin = "123456";
1518+
let new_user_pin = "123456abcdef";
15191519
let (pkcs11, slot) = init_pins();
15201520

15211521
let session = pkcs11.open_rw_session(slot)?;

cryptoki/tests/common/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ use cryptoki::types::AuthPin;
88
use std::env;
99

1010
// The default user pin
11-
pub static USER_PIN: &str = "fedcba";
11+
pub static USER_PIN: &str = "fedcba123456";
1212
// The default SO pin
13-
pub static SO_PIN: &str = "abcdef";
13+
pub static SO_PIN: &str = "abcdef654321";
1414

1515
fn get_pkcs11_path() -> String {
1616
env::var("TEST_PKCS11_MODULE")

0 commit comments

Comments
 (0)