Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ required-features = ["profiles"]
[dependencies]
clap = { version = "4.5.26", default-features = false, features = ["cargo", "derive", "help", "std", "usage"] }
kryoptic-lib.workspace = true
cryptoki = "0.10.0"
cryptoki = "0.11.0"
hex = "0.4.3"
libc = "0.2.151"
serde = { version = "1.0.180", features = ["derive"] }
Expand Down
6 changes: 4 additions & 2 deletions tools/softhsm/test_init.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::process::ExitCode;

use clap::Parser;
use cryptoki::context::{CInitializeArgs, Pkcs11};
use cryptoki::context::{CInitializeArgs, CInitializeFlags, Pkcs11};
use cryptoki::session::UserType;
use cryptoki::types::AuthPin;

Expand All @@ -27,7 +27,9 @@ fn main() -> ExitCode {
let pkcs11 = Pkcs11::new(args.pkcs11_module).unwrap();

// initialize the library
pkcs11.initialize(CInitializeArgs::OsThreads).unwrap();
pkcs11
.initialize(CInitializeArgs::new(CInitializeFlags::OS_LOCKING_OK))
.unwrap();

// find a slot, get the first one
let slot = pkcs11.get_slots_with_token().unwrap().remove(0);
Expand Down
6 changes: 4 additions & 2 deletions tools/softhsm/test_signature.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::process::ExitCode;

use clap::Parser;
use cryptoki::context::{CInitializeArgs, Pkcs11};
use cryptoki::context::{CInitializeArgs, CInitializeFlags, Pkcs11};
use cryptoki::mechanism::Mechanism;
use cryptoki::object::{Attribute, ObjectClass};
use cryptoki::session::UserType;
Expand All @@ -23,7 +23,9 @@ fn main() -> ExitCode {
let pkcs11 = Pkcs11::new(args.pkcs11_module).unwrap();

// initialize the library
pkcs11.initialize(CInitializeArgs::OsThreads).unwrap();
pkcs11
.initialize(CInitializeArgs::new(CInitializeFlags::OS_LOCKING_OK))
.unwrap();

// find a slot, get the first one
let slot = pkcs11.get_slots_with_token().unwrap().remove(0);
Expand Down
Loading