Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Sep 10, 2024
1 parent 0ab6075 commit 334812d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkcs11/src/api/generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
db::attr::CkRawAttrTemplate,
mechanism::{CkRawMechanism, Mechanism},
},
lock_session, read_session,
read_session,
};

pub extern "C" fn C_GenerateKey(
Expand Down Expand Up @@ -232,7 +232,7 @@ pub extern "C" fn C_GenerateRandom(

return cryptoki_sys::CKR_ARGUMENTS_BAD;
}
lock_session!(hSession, session);
read_session!(hSession, session);

if !session
.login_ctx
Expand Down
2 changes: 1 addition & 1 deletion pkcs11/src/backend/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl LoginCtx {
}

fn administrator(&self) -> Option<Configuration> {
get_user_api_config(self.operator_config(), self.next_instance())
get_user_api_config(self.admin_config(), self.next_instance())
}

fn operator_or_administrator(&self) -> Option<Configuration> {
Expand Down
1 change: 0 additions & 1 deletion pkcs11/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ macro_rules! lock_session {
return cryptoki_sys::CKR_SESSION_HANDLE_INVALID;
}
};
#[allow(unused_mut)]
let mut $session = $crate::lock_mutex!($session);
};
}
Expand Down

0 comments on commit 334812d

Please sign in to comment.