diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/share/ma/add_certifier | 4 | ||||
-rw-r--r-- | src/share/ma/remove_certifier | 2 | ||||
-rw-r--r-- | src/share/mh/add_hostname | 6 | ||||
-rw-r--r-- | src/share/mh/add_revoker | 4 | ||||
-rw-r--r-- | src/share/mh/import_key | 15 | ||||
-rw-r--r-- | src/share/mh/revoke_hostname | 8 |
6 files changed, 29 insertions, 10 deletions
diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier index f2cadf2..a48db64 100644 --- a/src/share/ma/add_certifier +++ b/src/share/ma/add_certifier @@ -126,8 +126,8 @@ else gpg_sphere "--fingerprint 0x${fingerprint}!" if [ "$PROMPT" = "true" ] ; then - echo "Are you sure you want to add the above key as a" - read -p "certifier of users on this system? (Y/n) " OK; OK=${OK:-Y} + echo "Are you sure you want to add the above key as a certifier" + read -p "of users on this system? (Y/n) " OK; OK=${OK:-Y} if [ "${OK/y/Y}" != 'Y' ] ; then failure "Identity certifier not added." fi diff --git a/src/share/ma/remove_certifier b/src/share/ma/remove_certifier index a9a1451..6c90358 100644 --- a/src/share/ma/remove_certifier +++ b/src/share/ma/remove_certifier @@ -27,7 +27,7 @@ fi gpg_core --list-key --fingerprint "0x${keyID}!" || failure if [ "$PROMPT" = "true" ] ; then - read -p "Really remove the identity certifier above? (Y/n) " OK; OK=${OK:-Y} + read -p "Really remove the above listed identity certifier? (Y/n) " OK; OK=${OK:-Y} if [ "${OK/y/Y}" != 'Y' ] ; then failure "Identity certifier not removed." fi diff --git a/src/share/mh/add_hostname b/src/share/mh/add_hostname index 0da6a06..ec741ee 100644 --- a/src/share/mh/add_hostname +++ b/src/share/mh/add_hostname @@ -32,8 +32,10 @@ find_host_userid > /dev/null && \ failure "Host userID '$userID' already exists." if [ "$PROMPT" = "true" ] ; then - echo "The following user ID will be added to the host key:" - echo " $userID" + cat <<EOF +The following user ID will be added to the host key: + $userID +EOF read -p "Are you sure you would like to add this user ID? (Y/n) " OK; OK=${OK:=Y} if [ "${OK/y/Y}" != 'Y' ] ; then failure "User ID not added." diff --git a/src/share/mh/add_revoker b/src/share/mh/add_revoker index 428b958..18ad2b7 100644 --- a/src/share/mh/add_revoker +++ b/src/share/mh/add_revoker @@ -80,8 +80,8 @@ else su_monkeysphere_user "GNUPGHOME=$tmpDir gpg --fingerprint 0x${fingerprint}!" if [ "$PROMPT" = "true" ] ; then - echo "Are you sure you want to add the above key as a" - read -p "revoker of the host key? (Y/n) " OK; OK=${OK:-Y} + echo "Are you sure you want to add the above key as a revoker" + read -p "of the host key? (Y/n) " OK; OK=${OK:-Y} if [ "${OK/y/Y}" != 'Y' ] ; then failure "revoker not added." fi diff --git a/src/share/mh/import_key b/src/share/mh/import_key index 040b41c..7c11890 100644 --- a/src/share/mh/import_key +++ b/src/share/mh/import_key @@ -44,6 +44,21 @@ fi userID="ssh://${hostName}" +if [ "$PROMPT" = "true" ] ; then + cat <<EOF +The ssh key will be imported and an OpenPGP certificate for this host +will be generated with the following user ID: + $userID +EOF + read -p "Are you sure you would like to create certificate? [Y/n] " OK; OK=${OK:-Y} + if [ "${OK/y/Y}" != 'Y' ] ; then + failure "revoker not added." + fi +else + log debug "importing key without prompting." +fi + + # create host home mkdir -p "${MHDATADIR}" mkdir -p "${GNUPGHOME_HOST}" diff --git a/src/share/mh/revoke_hostname b/src/share/mh/revoke_hostname index 71b56ed..1215828 100644 --- a/src/share/mh/revoke_hostname +++ b/src/share/mh/revoke_hostname @@ -43,9 +43,11 @@ uidIndex=$(find_host_userid) || \ failure "No non-revoked user ID found matching '$userID'." if [ "$PROMPT" = "true" ] ; then - echo "The following host key user ID will be revoked:" - echo " $userID" - read -p "Are you sure you would like to revoke this user ID? (N/y) " OK; OK=${OK:=Y} + cat <<EOF +The following host key user ID will be revoked: + $userID +EOF + read -p "Are you sure you would like to revoke this user ID? (Y/n) " OK; OK=${OK:=Y} if [ "${OK/y/Y}" != 'Y' ] ; then failure "User ID not revoked." fi |