Browse Source

Refresh gpg keys from user control panel

Bob Mottram 8 years ago
parent
commit
988ceb0281
1 changed files with 15 additions and 7 deletions
  1. 15
    7
      src/freedombone-controlpanel-user

+ 15
- 7
src/freedombone-controlpanel-user View File

364
 		   --msgbox $"Your key has now been published" 6 40
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
 function add_gpg_key {
373
 function add_gpg_key {
368
 	data=$(tempfile 2>/dev/null)
374
 	data=$(tempfile 2>/dev/null)
369
 	trap "rm -f $data" 0 1 2 5 15
375
 	trap "rm -f $data" 0 1 2 5 15
717
 		trap "rm -f $data" 0 1 2 5 15
723
 		trap "rm -f $data" 0 1 2 5 15
718
 		dialog --backtitle $"Freedombone User Control Panel" \
724
 		dialog --backtitle $"Freedombone User Control Panel" \
719
 			   --title $"My Encryption Keys" \
725
 			   --title $"My Encryption Keys" \
720
-			   --radiolist $"Choose an operation:" 16 70 8 \
726
+			   --radiolist $"Choose an operation:" 17 70 9 \
721
 			   1 $"Show your PGP/GPG key" off \
727
 			   1 $"Show your PGP/GPG key" off \
722
 			   2 $"Publish your PGP/GPG key so that others can find it" off \
728
 			   2 $"Publish your PGP/GPG key so that others can find it" off \
723
 			   3 $"Add someone's PGP/GPG key" off \
729
 			   3 $"Add someone's PGP/GPG key" off \
724
 			   4 $"Remove someone's PGP/GPG key" off \
730
 			   4 $"Remove someone's PGP/GPG key" off \
725
 			   5 $"Sign a PGP/GPG key" off \
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
 		sel=$?
736
 		sel=$?
730
 		case $sel in
737
 		case $sel in
731
 			1) break;;
738
 			1) break;;
737
 			3) add_gpg_key;;
744
 			3) add_gpg_key;;
738
 			4) remove_gpg_key;;
745
 			4) remove_gpg_key;;
739
 			5) sign_gpg_key;;
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
 		esac
751
 		esac
744
 	done
752
 	done
745
 }
753
 }