security sticker™

This commit is contained in:
2025-12-07 19:16:46 +01:00
parent 9ca4126e8a
commit fea4680642
2 changed files with 68 additions and 0 deletions

View File

@@ -343,12 +343,36 @@ function askReg() {
}
function enterSecurityCode() {
MAXLENGTH=6
askStr ${MAXLENGTH} "Security code" "Enter security code from the security sticker (e.g. S12345)."
if [ $? -eq 1 ]; then
return 1
fi
SECURITYCODE=$(cat $TMP)
confirm "Security code" "$SECURITYCODE"
return $?
}
function printSecurePassport(){
checkLockFile
diaBox "Insert Passport" "Please insert passport (Visas) into the printer.\nA print on EVERY Visa page is necessary."
cd "$1"
./secure "$SECURITYCODE"
cd ..
rm $LOCKFILE
}
function menuFor() {
dialog --backtitle "$BT" \
--menu "Select purpose:" 14 40 3 \
1 "Registration" \
2 "c3gov Stamp" \
3 "GPG" \
8 "Secure Passport" \
9 "Back" 2> $TMP
choice=$(cat $TMP)
@@ -372,6 +396,11 @@ function menuFor() {
printGPG "$1"
fi
;;
4) enterSecurityCode
if [ $? -eq 0 ]; then
printSecurePassport "$1"
fi
;;
esac
unset FNAME
@@ -380,6 +409,7 @@ function menuFor() {
unset FP
unset FIELD
unset FFP
unset SECURITYCODE
}
function askForFunnyUserCreds() {