Merge commit 'dkg/master'
authorJameson Graef Rollins <jrollins@finestructure.net>
Sat, 31 Jan 2009 23:34:06 +0000 (18:34 -0500)
committerJameson Graef Rollins <jrollins@finestructure.net>
Sat, 31 Jan 2009 23:34:06 +0000 (18:34 -0500)
1  2 
src/subcommands/mh/gen-key
src/subcommands/mh/import-key

index df57457f0b73e83329d7678d4609966879dc3fe3,8558441a9499b00bcf9750ef56dadeb274cc841c..72b913823761d1d099da1df7c5a9817d6a999fe6
@@@ -10,8 -10,6 +10,8 @@@
  # They are Copyright 2008, and are all released under the GPL, version 3
  # or later.
  
 +gen_key() {
 +
  local keyType="RSA"
  local keyLength="2048"
  local keyUsage="auth"
@@@ -29,10 -27,6 +29,6 @@@ fingerprint_server_key >/dev/null 
  # get options
  while true ; do
        case "$1" in
-           -h|--hostname)
-               hostName="$2"
-               shift 2
-               ;;
            -l|--length)
                keyLength="$2"
                shift 2
@@@ -46,6 -40,8 +42,8 @@@
                    failure "Unknown option '$1'.
  Type '$PGRM help' for usage."
                fi
+               hostName="$1"
+               shift;
                break
                ;;
        esac
@@@ -104,5 -100,3 +102,5 @@@ log info "SSH host public key in OpenPG
  
  # show info about new key
  show_key
 +
 +}
index d8ab9df51b8c726c5da6b54ad487292f906300c7,ac67711742859ad20e898fc2c45248d9fafd35f9..9ba51d24dfb26f99c1d9b600784ba5311ba56ab9
@@@ -10,8 -10,6 +10,8 @@@
  # They are Copyright 2008, and are all released under the GPL, version 3
  # or later.
  
 +import_key() {
 +
  local hostName=$(hostname -f)
  local keyFile="/etc/ssh/ssh_host_rsa_key"
  local keyExpire
@@@ -25,10 -23,6 +25,6 @@@ fingerprint_server_key >/dev/null 
  # get options
  while true ; do
        case "$1" in
-           -h|--hostname)
-               hostName="$2"
-               shift 2
-               ;;
            -f|--keyfile)
                keyFile="$2"
                shift 2
@@@ -42,6 -36,9 +38,9 @@@
                    failure "Unknown option '$1'.
  Type '$PGRM help' for usage."
                fi
+               hostName="$1"
+               shift
+               ;;
                break
                ;;
        esac
@@@ -85,5 -82,3 +84,5 @@@ log info "SSH host public key in OpenPG
  
  # show info about new key
  show_key
 +
 +}