Selaa lähdekoodia

Refresh gpg keys from user control panel

Bob Mottram 8 vuotta sitten
vanhempi
commit
988ceb0281
1 muutettua tiedostoa jossa 15 lisäystä ja 7 poistoa
  1. 15
    7
      src/freedombone-controlpanel-user

+ 15
- 7
src/freedombone-controlpanel-user Näytä tiedosto

@@ -364,6 +364,12 @@ function publish_gpg_key {
364 364
 		   --msgbox $"Your key has now been published" 6 40
365 365
 }
366 366
 
367
+function refresh_gpg_keys {
368
+	gpg --refresh-keys
369
+	dialog --title $"Refresh PGP/GPG keys" \
370
+		   --msgbox $"Your keys have been refreshed" 6 40
371
+}
372
+
367 373
 function add_gpg_key {
368 374
 	data=$(tempfile 2>/dev/null)
369 375
 	trap "rm -f $data" 0 1 2 5 15
@@ -717,15 +723,16 @@ function menu_encryption_keys {
717 723
 		trap "rm -f $data" 0 1 2 5 15
718 724
 		dialog --backtitle $"Freedombone User Control Panel" \
719 725
 			   --title $"My Encryption Keys" \
720
-			   --radiolist $"Choose an operation:" 16 70 8 \
726
+			   --radiolist $"Choose an operation:" 17 70 9 \
721 727
 			   1 $"Show your PGP/GPG key" off \
722 728
 			   2 $"Publish your PGP/GPG key so that others can find it" off \
723 729
 			   3 $"Add someone's PGP/GPG key" off \
724 730
 			   4 $"Remove someone's PGP/GPG key" off \
725 731
 			   5 $"Sign a PGP/GPG key" off \
726
-			   6 $"Add an ssh key for logging in" off \
727
-			   7 $"Remove an ssh key for logging in" off \
728
-			   8 $"Back to main menu" on 2> $data
732
+			   6 $"Refresh your PGP/GPG keys" off \
733
+			   7 $"Add an ssh key for logging in" off \
734
+			   8 $"Remove an ssh key for logging in" off \
735
+			   9 $"Back to main menu" on 2> $data
729 736
 		sel=$?
730 737
 		case $sel in
731 738
 			1) break;;
@@ -737,9 +744,10 @@ function menu_encryption_keys {
737 744
 			3) add_gpg_key;;
738 745
 			4) remove_gpg_key;;
739 746
 			5) sign_gpg_key;;
740
-			6) add_ssh_key;;
741
-			7) remove_ssh_key;;
742
-			8) break;;
747
+			6) refresh_gpg_keys;;
748
+			7) add_ssh_key;;
749
+			8) remove_ssh_key;;
750
+			9) break;;
743 751
 		esac
744 752
 	done
745 753
 }