summaryrefslogtreecommitdiff
path: root/src/share/mh
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/mh')
-rw-r--r--src/share/mh/add_revoker6
-rw-r--r--src/share/mh/import_key3
-rw-r--r--src/share/mh/publish_key2
3 files changed, 5 insertions, 6 deletions
diff --git a/src/share/mh/add_revoker b/src/share/mh/add_revoker
index b4113df..bdcb749 100644
--- a/src/share/mh/add_revoker
+++ b/src/share/mh/add_revoker
@@ -53,14 +53,14 @@ if [ -f "$keyID" ] ; then
fi
else
# create a temporary directory for storing the downloaded key
- TMPLOC=$(mktemp -d "${MHTMPDIR}"/tmp.XXXXXXXXXX) || failure "Could not create temporary directory!"
+ TMPLOC=$(msmktempdir) || failure "Could not create temporary directory!"
# download the key from the keyserver as the monkeysphere user
su_monkeysphere_user \
- "GNUPGHOME=$TMPLOC gpg --keyserver $KEYSERVER --recv-key 0x${keyID}!"
+ "GNUPGHOME=$TMPLOC gpg --quiet --keyserver $KEYSERVER --recv-key 0x${keyID}!"
# export the new key to the host keyring
- su_monkeysphere_user "GNUPGHOME=$TMPLOC gpg --export 0x${keyID}!" \
+ su_monkeysphere_user "GNUPGHOME=$TMPLOC gpg --quiet --export 0x${keyID}!" \
| gpg_host --import
fi
diff --git a/src/share/mh/import_key b/src/share/mh/import_key
index 557bb7f..cca40fa 100644
--- a/src/share/mh/import_key
+++ b/src/share/mh/import_key
@@ -39,14 +39,13 @@ userID="ssh://${hostName}"
# create host home
mkdir -p "${MHDATADIR}"
-mkdir -p "${MHTMPDIR}"
mkdir -p "${GNUPGHOME_HOST}"
chmod 700 "${GNUPGHOME_HOST}"
log verbose "importing ssh key..."
# translate ssh key to a private key
PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "$userID" \
- | gpg_host --import 2>&1 | log debug
+ | gpg_host --import
# load the new host fpr into the fpr variable. this is so we can
# create the gpg pub key file. we have to do this from the secret key
diff --git a/src/share/mh/publish_key b/src/share/mh/publish_key
index b433ad7..37b8a72 100644
--- a/src/share/mh/publish_key
+++ b/src/share/mh/publish_key
@@ -27,7 +27,7 @@ else
fi
# create a temporary gnupg directory from which to publish the key
-export GNUPGHOME=$(mktemp -d)
+export GNUPGHOME=$(msmktempdir)
# trap to remove tmp dir if break
trap "rm -rf $GNUPGHOME" EXIT