mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-29 15:44:07 +00:00
Replace libremkey_htop_* by hotp_*
This commit is contained in:
parent
c2a2134eb2
commit
53dc659c01
@ -92,7 +92,7 @@ update_totp()
|
||||
{
|
||||
echo "Scan the QR code to add the new TOTP secret"
|
||||
/bin/seal-totp
|
||||
if [ -x /bin/libremkey_hotp_verification ]; then
|
||||
if [ -x /bin/hotp_verification ]; then
|
||||
echo "Once you have scanned the QR code, hit Enter to configure your HOTP USB Security Dongle (e.g. Librem Key or Nitrokey)"
|
||||
read
|
||||
/bin/seal-hotpkey
|
||||
@ -195,16 +195,16 @@ while true; do
|
||||
fi
|
||||
|
||||
if [ "$totp_confirm" = "i" -o -z "$totp_confirm" ]; then
|
||||
if [ -x /bin/libremkey_hotp_verification ]; then
|
||||
if [ -x /bin/hotp_verification ]; then
|
||||
HOTP=`unseal-hotp`
|
||||
enable_usb
|
||||
if ! libremkey_hotp_verification info ; then
|
||||
if ! hotp_verification info ; then
|
||||
whiptail $CONFIG_WARNING_BG_COLOR --clear \
|
||||
--title "WARNING: Please Insert Your $HOTPKEY_BRANDING" \
|
||||
--msgbox "Your $HOTPKEY_BRANDING was not detected.\n\nPlease insert your $HOTPKEY_BRANDING" 30 90
|
||||
fi
|
||||
# Don't output HOTP codes to screen, so as to make replay attacks harder
|
||||
libremkey_hotp_verification check $HOTP
|
||||
hotp_verification check $HOTP
|
||||
case "$?" in
|
||||
0 )
|
||||
HOTP="Success"
|
||||
|
@ -86,7 +86,7 @@ luks_pcr=`tpm calcfuturepcr -ix 16 -if /tmp/luksDump.txt`
|
||||
|
||||
# HOTP USB Secrity Dongle loads USB modules which changes PCR5.
|
||||
# In the event HOTP USB Security Dongle is enabled, skip verification of PCR5
|
||||
if [ -x /bin/libremkey_hotp_verification ]; then
|
||||
if [ -x /bin/hotp_verification ]; then
|
||||
pcr_5="X"
|
||||
else
|
||||
pcr_5="0000000000000000000000000000000000000000"
|
||||
|
@ -57,10 +57,10 @@ mount_boot
|
||||
counter_value=1
|
||||
|
||||
enable_usb
|
||||
if ! libremkey_hotp_verification info ; then
|
||||
if ! hotp_verification info ; then
|
||||
echo "Insert your $HOTPKEY_BRANDING and press Enter to configure it"
|
||||
read
|
||||
if ! libremkey_hotp_verification info ; then
|
||||
if ! hotp_verification info ; then
|
||||
# don't leak key on failure
|
||||
shred -n 10 -z -u "$HOTP_SECRET" 2> /dev/null
|
||||
die "Unable to find $HOTPKEY_BRANDING"
|
||||
@ -80,12 +80,12 @@ echo -e ""
|
||||
read -s -p "Enter your $HOTPKEY_BRANDING Admin PIN: " admin_pin
|
||||
echo -e "\n"
|
||||
|
||||
libremkey_hotp_initialize "$admin_pin" $HOTP_SECRET $counter_value
|
||||
hotp_initialize "$admin_pin" $HOTP_SECRET $counter_value $HOTPKEY_BRANDING
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\n"
|
||||
read -s -p "Error setting HOTP secret, re-enter Admin PIN and try again: " admin_pin
|
||||
echo -e "\n"
|
||||
if ! libremkey_hotp_initialize "$admin_pin" $HOTP_SECRET $counter_value ; then
|
||||
if ! hotp_initialize "$admin_pin" $HOTP_SECRET $counter_value $HOTPKEY_BRANDING ; then
|
||||
# don't leak key on failure
|
||||
shred -n 10 -z -u "$HOTP_SECRET" 2> /dev/null
|
||||
die "Setting HOTP secret failed"
|
||||
|
@ -2,19 +2,19 @@ modules-$(CONFIG_HOTPKEY) += hotp-verification
|
||||
|
||||
hotp-verification_depends := libusb $(musl_dep)
|
||||
|
||||
hotp-verification_version := 29094d8ff0f1c9321886079860f3747aa04c44b4
|
||||
hotp-verification_version := 5fb260e631b237a298b6dcca47bbd728f2c5ac3a
|
||||
hotp-verification_dir := hotp-verification-$(hotp-verification_version)
|
||||
hotp-verification_tar := nitrokey-hotp-verification-$(hotp-verification_version).tar.gz
|
||||
hotp-verification_url := https://github.com/Nitrokey/nitrokey-hotp-verification/archive/$(hotp-verification_version).tar.gz
|
||||
hotp-verification_hash := b8591a6abafaefd769e7e58d121d4ba6af1c54587b4b7f3438d65b37632fa2b0
|
||||
hotp-verification_hash := 5d98d158ba97fb970061d68e2c6f41582395e687b7752efb1a8038762b0e7b79
|
||||
|
||||
hotp-verification_target := \
|
||||
$(MAKE_JOBS) \
|
||||
$(CROSS_TOOLS) \
|
||||
|
||||
hotp-verification_output := \
|
||||
libremkey_hotp_verification \
|
||||
libremkey_hotp_initialize
|
||||
hotp_verification \
|
||||
hotp_initialize
|
||||
|
||||
hotp-verification_configure := \
|
||||
INSTALL="$(INSTALL)" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user