Skip to content

Commit

Permalink
handle PIN with special characters in scripts piping to fido2luks-0.2.19
Browse files Browse the repository at this point in the history
  • Loading branch information
adeliktas committed Nov 11, 2024
1 parent 71c244d commit 44c3fae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/skfde-cred
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "Generate the SoloKey credential"
read -s -p "Enter the SoloKey PIN and Press the button: " PIN
echo -e "\nRemember to press the SoloKey button if necessary"

CREDENTIAL="$(printf $PIN | fido2luks credential \
CREDENTIAL="$(echo -n ${PIN} | fido2luks credential \
--pin --pin-source /dev/stdin 2>&1)"

echo "SoloKey credential : $CREDENTIAL"
2 changes: 1 addition & 1 deletion src/skfde-enroll
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ fi
if [ -z "$SKFDE_RESPONSE" ]; then
read -s -p "Enter the SoloKey PIN: " PIN
echo -e "\nRemember to press the SoloKey button if necessary"
SKFDE_RESPONSE="$(printf $PIN | fido2luks print-secret $SKFDE_CREDENTIAL \
SKFDE_RESPONSE="$(echo -n ${PIN} | fido2luks print-secret $SKFDE_CREDENTIAL \
--salt string:$SKFDE_CHALLENGE --pin --pin-source /dev/stdin 2>&1)"
SKFDE_PASSPHRASE="$SKFDE_RESPONSE"
fi
Expand Down
2 changes: 1 addition & 1 deletion src/skfde-format
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
if [ -z "$SKFDE_RESPONSE" ]; then
read -s -p "Enter the SoloKey PIN: " PIN
echo -e "\nRemember to press the SoloKey button if necessary"
SKFDE_RESPONSE="$(printf $PIN | fido2luks print-secret $SKFDE_CREDENTIAL \
SKFDE_RESPONSE="$(echo -n ${PIN} | fido2luks print-secret $SKFDE_CREDENTIAL \
--salt string:$SKFDE_CHALLENGE --pin --pin-source /dev/stdin 2>&1)"
SKFDE_PASSPHRASE="$SKFDE_RESPONSE"
fi
Expand Down
2 changes: 1 addition & 1 deletion src/skfde-open
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fi
if [ -z "$SKFDE_RESPONSE" ]; then
read -s -p "Enter the SoloKey PIN: " PIN
echo -e "\nRemember to press the SoloKey button if necessary"
SKFDE_RESPONSE="$(printf $PIN | fido2luks print-secret $SKFDE_CREDENTIAL \
SKFDE_RESPONSE="$(echo -n ${PIN} | fido2luks print-secret $SKFDE_CREDENTIAL \
--salt string:$SKFDE_CHALLENGE --pin --pin-source /dev/stdin 2>&1)"
SKFDE_PASSPHRASE="$SKFDE_RESPONSE"
fi
Expand Down

0 comments on commit 44c3fae

Please sign in to comment.