pam_mod #4

Open
shimun wants to merge 16 commits from pam_mod into master
3 changed files with 146 additions and 0 deletions
Showing only changes of commit f2a8e412ac - Show all commits

View File

@@ -79,11 +79,12 @@ impl PamFido2Luks {
.collect();
let credentials: Vec<&FidoCredential> = credentials.iter().collect();
if !credentials.is_empty() {
let salt = util::sha256(&[password.as_bytes()]);
let secret = util::sha256(&[
password.as_bytes(),
&salt,
&perform_challenge(
&credentials[..],
&util::sha256(&[password.as_bytes()]),
&salt,
Duration::from_secs(15),
pin.map(AsRef::as_ref),
)?