]> gitweb.fluxo.info Git - firma.git/commitdiff
Setting 4096 as default key size
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 12 Apr 2012 00:30:12 +0000 (21:30 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 12 Apr 2012 00:30:12 +0000 (21:30 -0300)
firma

diff --git a/firma b/firma
index 781e5b856de18448b13c983709b81a5b9046bc3c..10317edbc626994da540c9ca5b50837039a83c8b 100755 (executable)
--- a/firma
+++ b/firma
@@ -1182,8 +1182,8 @@ function NewList {
         while true; do
           echo "  Please choose a key size:"
           echo "    1 - 1024"
-          echo "    2 - 2048 (default)"
-          echo "    3 - 4096"
+          echo "    2 - 2048"
+          echo "    3 - 4096 (default)"
           read -rep "  Please choose a key size or 'quit' to exit:  " answer
           answer="$(echo $answer | tr '[:lower:]' '[:upper:]')"
           if [[ "$answer" == "QUIT" ]]; then
@@ -1195,10 +1195,10 @@ function NewList {
           elif [[ "$answer" == "1" || "$answer" == "1024" ]]; then
             KEY_SIZE="1024"
             break
-          elif [[ -z "$answer" || "$answer" == "2" || "$answer" == "2048" ]]; then
+          elif [[ "$answer" == "2" || "$answer" == "2048" ]]; then
             KEY_SIZE="2048"
             break
-          elif [[ "$answer" == "3" || "$answer" == "4096" ]]; then
+          elif [[ -z "$answer" || "$answer" == "3" || "$answer" == "4096" ]]; then
             KEY_SIZE="4096"
             break
           else
@@ -1253,7 +1253,7 @@ function NewList {
           $GPG --gen-key <<EOF
 
             Key-Type: DSA
-            Key-Length: 1024
+            Key-Length: $KEY_SIZE
             Subkey-Type: ELG-E
             Subkey-Length: $KEY_SIZE