This commit is contained in:
Bob Mottram 2016-10-27 10:44:08 +01:00
parent 37e3818ad7
commit 5a8d9de8e1
1 changed files with 6 additions and 6 deletions

View File

@ -122,13 +122,13 @@ source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
for f in $UTILS_FILES
do
source $f
source $f
done
APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
for f in $APP_FILES
do
source $f
source $f
done
function show_help {
@ -927,19 +927,19 @@ function reconstruct_key {
cd /home/$MY_USERNAME/.gnupg_fragments
no_of_shares=$(ls -afq keyshare.asc.* | wc -l)
if (( no_of_shares < 4 )); then
dialog --title $"Encryption keys" --msgbox $'Not enough fragments to reconstruct the key' 6 70
dialog --title $"Recover Encryption Keys" --msgbox $'Not enough fragments to reconstruct the key' 6 70
exit 7348
fi
apt-get -yq install libgfshare-bin gnupg
gfcombine /home/$MY_USERNAME/.gnupg_fragments/keyshare*
if [ ! "$?" = "0" ]; then
dialog --title $"Encryption keys" --msgbox $'Unable to reconstruct the key' 6 70
dialog --title $"Recover Encryption Keys" --msgbox $'Unable to reconstruct the key' 6 70
exit 7348
fi
KEYS_FILE=/home/$MY_USERNAME/.gnupg_fragments/keyshare.asc
if [ ! -f $KEYS_FILE ]; then
dialog --title $"Encryption keys" --msgbox $'Unable to reconstruct the key' 6 70
dialog --title $"Recover Encryption Keys" --msgbox $'Unable to reconstruct the key' 6 70
fi
su -c "gpg --allow-secret-key-import --import $KEYS_FILE" - $MY_USERNAME
@ -951,7 +951,7 @@ function reconstruct_key {
fi
shred -zu $KEYS_FILE
dialog --title $"Encryption keys" --msgbox $'Key has been reconstructed' 6 70
dialog --title $"Recover Encryption Keys" --msgbox $'Key has been reconstructed' 6 70
}
function interactive_gpg_from_usb {