Ask for securing the passport
This commit is contained in:
57
start_dialog
57
start_dialog
@@ -323,6 +323,13 @@ function askReg() {
|
|||||||
|
|
||||||
confirm=" Forename: $FNAME\n Surname: $SNAME\n Place: $PLANET"
|
confirm=" Forename: $FNAME\n Surname: $SNAME\n Place: $PLANET"
|
||||||
|
|
||||||
|
ynBox "Security" "Secure this passport using security stickers?"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
SECURE=true
|
||||||
|
else
|
||||||
|
SECURE=false
|
||||||
|
fi
|
||||||
|
|
||||||
ynBox "c3gov Stamp" "Does this entity want to have a c3gov stamp?"
|
ynBox "c3gov Stamp" "Does this entity want to have a c3gov stamp?"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
STAMP=true
|
STAMP=true
|
||||||
@@ -351,7 +358,7 @@ function enterSecurityCode() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
SECURITYCODE=$(cat $TMP)
|
SECURITYCODE=$(cat $TMP)
|
||||||
confirm "Security code" "$SECURITYCODE"
|
confirm "Security code" "Security code: $SECURITYCODE"
|
||||||
return $?
|
return $?
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -376,6 +383,27 @@ function printSecurePassport(){
|
|||||||
rm $LOCKFILE
|
rm $LOCKFILE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function enableSecurity() {
|
||||||
|
if [ "$1" = "bounddipl" ]; then
|
||||||
|
diaBox "Error" "Passport security: Passport not supported."
|
||||||
|
else
|
||||||
|
enterSecurityCode
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
case $1 in
|
||||||
|
"bounddipl")
|
||||||
|
;;
|
||||||
|
"jhp")
|
||||||
|
printSecurePassport "$1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printSecurePassportFirstPage "$1"
|
||||||
|
printSecurePassport "$1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function menuFor() {
|
function menuFor() {
|
||||||
dialog --backtitle "$BT" \
|
dialog --backtitle "$BT" \
|
||||||
--menu "Select purpose:" 14 40 3 \
|
--menu "Select purpose:" 14 40 3 \
|
||||||
@@ -391,7 +419,10 @@ function menuFor() {
|
|||||||
1) askReg "$1"
|
1) askReg "$1"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
printReg "$1"
|
printReg "$1"
|
||||||
if [ "$STAMP" == "true" ]; then
|
if [ "$SECURE" = "true" ]; then
|
||||||
|
enableSecurity "$1"
|
||||||
|
fi
|
||||||
|
if [ "$STAMP" = "true" ]; then
|
||||||
printc3govStamp "$1"
|
printc3govStamp "$1"
|
||||||
fi
|
fi
|
||||||
if [ -n "$FP" ]; then
|
if [ -n "$FP" ]; then
|
||||||
@@ -406,25 +437,11 @@ function menuFor() {
|
|||||||
printGPG "$1"
|
printGPG "$1"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
8) if [ "$1" = "bounddipl" ]; then
|
8) enableSecurity "$1"
|
||||||
diaBox "Error" "Passport not supported."
|
;;
|
||||||
else
|
|
||||||
enterSecurityCode
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
case $1 in
|
|
||||||
"bounddipl")
|
|
||||||
;;
|
|
||||||
"jhp")
|
|
||||||
printSecurePassport "$1"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
printSecurePassportFirstPage "$1"
|
|
||||||
printSecurePassport "$1"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
unset FNAME
|
unset FNAME
|
||||||
unset SNAME
|
unset SNAME
|
||||||
unset PLANET
|
unset PLANET
|
||||||
|
|||||||
Reference in New Issue
Block a user