fix ykfde_enroll
This commit is contained in:
@@ -20,11 +20,14 @@ YKFDE_STORAGE=/boot/crypt-storage/default
|
|||||||
YKFDE_SLOT_CHECK="$(ykinfo -q -"$YKFDE_SLOT")"
|
YKFDE_SLOT_CHECK="$(ykinfo -q -"$YKFDE_SLOT")"
|
||||||
printf '%s\n' " > YubiKey slot status 'ykinfo -q -$YKFDE_SLOT': $YKFDE_SLOT_CHECK"
|
printf '%s\n' " > YubiKey slot status 'ykinfo -q -$YKFDE_SLOT': $YKFDE_SLOT_CHECK"
|
||||||
|
|
||||||
if [ "$YKFDE_SLOT_CHECK" != 1 ]; then
|
if [ "$(ykinfo -q -"$YKFDE_SLOT")" != 1 ]; then
|
||||||
printf '%s\n' "ERROR: Chosen YubiKey slot '$YKFDE_SLOT' isn't configured. Please choose slot configured for 'HMAC-SHA1 Challenge-Response' mode in '/etc/ykfde.conf'"
|
printf '%s\n' "ERROR: Chosen YubiKey slot '$YKFDE_SLOT' isn't configured. Please insert a YubiKey with the slot configured for 'HMAC-SHA1 Challenge-Response'."
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
while [ "$(ykinfo -q -"$YKFDE_SLOT")" != 1 ]
|
||||||
|
do
|
||||||
|
done
|
||||||
|
|
||||||
YKFDE_SALT="$(dd if=/dev/random bs=1 count=$YKFDE_SALT_LENGTH 2>/dev/null | rbtohex)"
|
YKFDE_SALT="$(dd if=/dev/random bs=1 count=$YKFDE_SALT_LENGTH 2>/dev/null | rbtohex)"
|
||||||
if [ -f "$YKFDE_STORAGE" ]; then
|
if [ -f "$YKFDE_STORAGE" ]; then
|
||||||
YKFDE_SALT="$(head -1 $YKFDE_STORAGE)"
|
YKFDE_SALT="$(head -1 $YKFDE_STORAGE)"
|
||||||
|
|||||||
Reference in New Issue
Block a user