diff --git a/utils/pkgs/ykfde/scripts/ykfde_enroll b/utils/pkgs/ykfde/scripts/ykfde_enroll index 26a00ff..7072c31 100755 --- a/utils/pkgs/ykfde/scripts/ykfde_enroll +++ b/utils/pkgs/ykfde/scripts/ykfde_enroll @@ -20,11 +20,14 @@ YKFDE_STORAGE=/boot/crypt-storage/default YKFDE_SLOT_CHECK="$(ykinfo -q -"$YKFDE_SLOT")" printf '%s\n' " > YubiKey slot status 'ykinfo -q -$YKFDE_SLOT': $YKFDE_SLOT_CHECK" -if [ "$YKFDE_SLOT_CHECK" != 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'" - exit 1 +if [ "$(ykinfo -q -"$YKFDE_SLOT")" != 1 ]; then + 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'." 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)" if [ -f "$YKFDE_STORAGE" ]; then YKFDE_SALT="$(head -1 $YKFDE_STORAGE)"