Refresh gpg keys from user control panel

This commit is contained in:
Bob Mottram 2016-05-02 16:40:59 +01:00
parent 24c1b859c9
commit 988ceb0281
1 changed files with 15 additions and 7 deletions

View File

@ -364,6 +364,12 @@ function publish_gpg_key {
--msgbox $"Your key has now been published" 6 40
}
function refresh_gpg_keys {
gpg --refresh-keys
dialog --title $"Refresh PGP/GPG keys" \
--msgbox $"Your keys have been refreshed" 6 40
}
function add_gpg_key {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
@ -717,15 +723,16 @@ function menu_encryption_keys {
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone User Control Panel" \
--title $"My Encryption Keys" \
--radiolist $"Choose an operation:" 16 70 8 \
--radiolist $"Choose an operation:" 17 70 9 \
1 $"Show your PGP/GPG key" off \
2 $"Publish your PGP/GPG key so that others can find it" off \
3 $"Add someone's PGP/GPG key" off \
4 $"Remove someone's PGP/GPG key" off \
5 $"Sign a PGP/GPG key" off \
6 $"Add an ssh key for logging in" off \
7 $"Remove an ssh key for logging in" off \
8 $"Back to main menu" on 2> $data
6 $"Refresh your PGP/GPG keys" off \
7 $"Add an ssh key for logging in" off \
8 $"Remove an ssh key for logging in" off \
9 $"Back to main menu" on 2> $data
sel=$?
case $sel in
1) break;;
@ -737,9 +744,10 @@ function menu_encryption_keys {
3) add_gpg_key;;
4) remove_gpg_key;;
5) sign_gpg_key;;
6) add_ssh_key;;
7) remove_ssh_key;;
8) break;;
6) refresh_gpg_keys;;
7) add_ssh_key;;
8) remove_ssh_key;;
9) break;;
esac
done
}