X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fsubcommands%2Fmh%2Fgen-key;h=aad213a3cbe272f2a9bc120d7451d99d607de3c3;hb=8001b4523c665ee7d9ded64cbdb7081b023b75c1;hp=554c04c5a8a43ccc1cffe2290cff7e80448fad47;hpb=7d4b4815db8ba2f6f984a18a90b50032cf9158ba;p=monkeysphere.git diff --git a/src/subcommands/mh/gen-key b/src/subcommands/mh/gen-key old mode 100755 new mode 100644 index 554c04c..aad213a --- a/src/subcommands/mh/gen-key +++ b/src/subcommands/mh/gen-key @@ -1,20 +1,22 @@ -#!/usr/bin/env bash +# -*-shell-script-*- +# This should be sourced by bash (though we welcome changes to make it POSIX sh compliant) # Monkeysphere host gen-key subcommand # # The monkeysphere scripts are written by: -# Jameson Rollins +# Jameson Rollins # Jamie McClelland # Daniel Kahn Gillmor # -# They are Copyright 2008, and are all released under the GPL, version 3 -# or later. +# They are Copyright 2008-2009, and are all released under the GPL, +# version 3 or later. + +gen_key() { local keyType="RSA" local keyLength="2048" local keyUsage="auth" local keyExpire -local revoker local hostName=$(hostname -f) local userID local keyParameters @@ -36,10 +38,6 @@ while true ; do keyExpire="$2" shift 2 ;; - -r|--revoker) - revoker="$2" - shift 2 - ;; *) if [ "$(echo "$1" | cut -c 1)" = '-' ] ; then failure "Unknown option '$1'. @@ -65,15 +63,6 @@ Key-Usage: $keyUsage Name-Real: $userID Expire-Date: $keyExpire" -# add the revoker field if specified -# FIXME: the "1:" below assumes that $REVOKER's key is an RSA key. -# FIXME: key is marked "sensitive"? is this appropriate? -if [ "$revoker" ] ; then - keyParameters=\ -"${keyParameters} -Revoker: 1:${revoker} sensitive" -fi - echo "The following key parameters will be used for the host private key:" echo "$keyParameters" @@ -113,4 +102,6 @@ gpg_authentication "--export-options export-minimal --armor --export 0x${fingerp log info "SSH host public key in OpenPGP form: ${SYSDATADIR}/ssh_host_rsa_key.pub.gpg" # show info about new key -show_server_key +show_key + +}