Skip to content

Commit 0fe2854

Browse files
authored
Merge pull request #258 from Jakuje/kryoptic-fixed
Remove skipping of kryoptic tests as they should work now
2 parents 81ae20f + 7e92fca commit 0fe2854

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

cryptoki/tests/basic.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -601,11 +601,6 @@ fn encrypt_decrypt_multipart_already_initialized() -> TestResult {
601601
#[test]
602602
#[serial]
603603
fn derive_key() -> TestResult {
604-
/* FIXME: This is now broken in Kryoptic: https://github.com/latchset/kryoptic/issues/184 */
605-
if !is_softhsm() {
606-
/* return Ignore(); */
607-
return Ok(());
608-
}
609604
let (pkcs11, slot) = init_pins();
610605

611606
// open a session
@@ -904,12 +899,6 @@ fn session_objecthandle_iterator() -> testresult::TestResult {
904899
#[test]
905900
#[serial]
906901
fn wrap_and_unwrap_key() {
907-
/* FIXME: This is now broken in Kryoptic: https://github.com/latchset/kryoptic/issues/184 */
908-
if !is_softhsm() {
909-
/* return Ignore(); */
910-
return;
911-
}
912-
913902
let (pkcs11, slot) = init_pins();
914903
// open a session
915904
let session = pkcs11.open_rw_session(slot).unwrap();
@@ -952,7 +941,7 @@ fn wrap_and_unwrap_key() {
952941
];
953942

954943
// priv key template
955-
let priv_key_template = vec![Attribute::Token(true)];
944+
let priv_key_template = vec![Attribute::Token(true), (Attribute::Unwrap(true))];
956945

957946
let (wrapping_key, unwrapping_key) = session
958947
.generate_key_pair(
@@ -1048,7 +1037,7 @@ fn get_info_test() -> TestResult {
10481037
assert_eq!(info.cryptoki_version().minor(), 40);
10491038
} else {
10501039
assert_eq!(info.cryptoki_version().major(), 3);
1051-
assert_eq!(info.cryptoki_version().minor(), 0);
1040+
assert_eq!(info.cryptoki_version().minor(), 2);
10521041
}
10531042
Ok(())
10541043
}
@@ -1352,11 +1341,6 @@ fn test_clone_initialize() {
13521341
#[test]
13531342
#[serial]
13541343
fn aes_key_attributes_test() -> TestResult {
1355-
/* FIXME: This is now broken in Kryoptic: https://github.com/latchset/kryoptic/issues/182 */
1356-
if !is_softhsm() {
1357-
/* return Ignore(); */
1358-
return Ok(());
1359-
}
13601344
let (pkcs11, slot) = init_pins();
13611345

13621346
// open a session
@@ -1672,11 +1656,6 @@ fn sha256_digest_multipart() -> TestResult {
16721656
#[test]
16731657
#[serial]
16741658
fn sha256_digest_multipart_with_key() -> TestResult {
1675-
// FIXME: Getting value from sensitive objects is now broken in Kryoptic: https://github.com/latchset/kryoptic/issues/193
1676-
if !is_softhsm() {
1677-
return Ok(());
1678-
}
1679-
16801659
let (pkcs11, slot) = init_pins();
16811660

16821661
// Open a session and log in

0 commit comments

Comments
 (0)