Skip to content

Commit

Permalink
1FA possible also for yubikey-luks-open
Browse files Browse the repository at this point in the history
  • Loading branch information
Szewcson committed Mar 7, 2022
1 parent 7cedca9 commit 2954e71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions yubikey-luks-open
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ while true ; do
read -r _ <&1
done

P1=$(/lib/cryptsetup/askpass "Enter password created with yubikey-luks-enroll:")
if [ "$DBG" = "1" ]; then echo "Password: $P1"; fi
if [ -z "$YUBIKEY_CHALLENGE" ]; then
P1=$(/lib/cryptsetup/askpass "Enter password created with yubikey-luks-enroll:")
if [ "$DBG" = "1" ]; then echo "Password: $P1"; fi
else
P1="$YUBIKEY_CHALLENGE"
fi

if [ "$HASH" = "1" ]; then
P1=$(printf %s "$P1" | sha256sum | awk '{print $1}')
Expand Down

0 comments on commit 2954e71

Please sign in to comment.