瀏覽代碼

Option to show the users full gpg key

Bob Mottram 8 年之前
父節點
當前提交
a86eda5d52
共有 1 個文件被更改,包括 28 次插入19 次删除
  1. 28
    19
      src/freedombone-controlpanel-user

+ 28
- 19
src/freedombone-controlpanel-user 查看文件

@@ -403,6 +403,13 @@ function show_gpg_key {
403 403
            --msgbox $"Email Address: $MY_EMAIL_ADDRESS\n\nKey ID: $GPG_ID\n\nFingerprint: $GPG_FINGERPRINT\n\nCreated: $GPG_DATE" 12 70
404 404
 }
405 405
 
406
+function show_full_gpg_key {
407
+    clear
408
+    gpg --armor --export $GPG_ID
409
+    gpg --armor --export-secret-key $GPG_ID
410
+    any_key
411
+}
412
+
406 413
 function publish_gpg_key {
407 414
     gpg --send-key $GPG_ID
408 415
     if [ $GPG_BACKUP_ID ]; then
@@ -663,17 +670,18 @@ function menu_encryption_keys {
663 670
         trap "rm -f $data" 0 1 2 5 15
664 671
         dialog --backtitle $"Freedombone User Control Panel" \
665 672
                --title $"My Encryption Keys" \
666
-               --radiolist $"Choose an operation:" 18 70 10 \
673
+               --radiolist $"Choose an operation:" 19 70 11 \
667 674
                1 $"Show your PGP/GPG key" off \
668
-               2 $"Publish your PGP/GPG key so that others can find it" off \
669
-               3 $"Add someone's PGP/GPG key" off \
670
-               4 $"Remove someone's PGP/GPG key" off \
671
-               5 $"Sign a PGP/GPG key or website domain" off \
672
-               6 $"Refresh your PGP/GPG keys" off \
673
-               7 $"Add an ssh key for logging in" off \
674
-               8 $"Remove an ssh key for logging in" off \
675
-               9 $"Set the trust level for a PGP/GPG key" off \
676
-               10 $"Back to main menu" on 2> $data
675
+               2 $"Show your full PGP/GPG key, including private key" off \
676
+               3 $"Publish your PGP/GPG key so that others can find it" off \
677
+               4 $"Add someone's PGP/GPG key" off \
678
+               5 $"Remove someone's PGP/GPG key" off \
679
+               6 $"Sign a PGP/GPG key or website domain" off \
680
+               7 $"Refresh your PGP/GPG keys" off \
681
+               8 $"Add an ssh key for logging in" off \
682
+               9 $"Remove an ssh key for logging in" off \
683
+               10 $"Set the trust level for a PGP/GPG key" off \
684
+               11 $"Back to main menu" on 2> $data
677 685
         sel=$?
678 686
         case $sel in
679 687
             1) break;;
@@ -681,15 +689,16 @@ function menu_encryption_keys {
681 689
         esac
682 690
         case $(cat $data) in
683 691
             1) show_gpg_key;;
684
-            2) publish_gpg_key;;
685
-            3) add_gpg_key;;
686
-            4) remove_gpg_key;;
687
-            5) sign_gpg_key;;
688
-            6) refresh_gpg_keys;;
689
-            7) add_ssh_key;;
690
-            8) remove_ssh_key;;
691
-            9) gpg_key_trust;;
692
-            10) break;;
692
+            2) show_full_gpg_key;;
693
+            3) publish_gpg_key;;
694
+            4) add_gpg_key;;
695
+            5) remove_gpg_key;;
696
+            6) sign_gpg_key;;
697
+            7) refresh_gpg_keys;;
698
+            8) add_ssh_key;;
699
+            9) remove_ssh_key;;
700
+            10) gpg_key_trust;;
701
+            11) break;;
693 702
         esac
694 703
     done
695 704
 }