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(); .collect();
let credentials: Vec<&FidoCredential> = credentials.iter().collect(); let credentials: Vec<&FidoCredential> = credentials.iter().collect();
if !credentials.is_empty() { if !credentials.is_empty() {
let salt = util::sha256(&[password.as_bytes()]);
let secret = util::sha256(&[ let secret = util::sha256(&[
password.as_bytes(), &salt,
&perform_challenge( &perform_challenge(
&credentials[..], &credentials[..],
&util::sha256(&[password.as_bytes()]), &salt,
Duration::from_secs(15), Duration::from_secs(15),
pin.map(AsRef::as_ref), pin.map(AsRef::as_ref),
)? )?