aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-11-19 17:22:33 -0200
committerSilvio Rhatto <rhatto@riseup.net>2012-11-19 17:22:33 -0200
commit27b131115b3e983575cc2f64c695d2269baa15e6 (patch)
treefcb1c6cdfbdde939c1fad4758f38148ee17f405b /share
parent07c058cac1292eaeda9fea0c963c3867d52fc7f7 (diff)
downloadkeyringer-27b131115b3e983575cc2f64c695d2269baa15e6.tar.gz
keyringer-27b131115b3e983575cc2f64c695d2269baa15e6.tar.bz2
Minor changes at genpair action
Diffstat (limited to 'share')
-rwxr-xr-xshare/keyringer/genpair12
1 files changed, 6 insertions, 6 deletions
diff --git a/share/keyringer/genpair b/share/keyringer/genpair
index 85ec1ac..a1a122e 100755
--- a/share/keyringer/genpair
+++ b/share/keyringer/genpair
@@ -70,7 +70,7 @@ EOF
echo "Encrypting public key into keyringer..."
$GPG --armor --homedir "$TMPWORK" --export | keyringer_exec encrypt "$BASEDIR" "$FILE.pub"
echo "Encrypting passphrase into keyringer..."
- echo "Passphrase for $FILE: $passphrase" | keyringer_exec encrypt "$BASEDIR" "$FILE.passwd"
+ echo "Passphrase for $FILE: $passphrase" | keyringer_exec encrypt "$BASEDIR" "$FILE.passwd"
# TODO: add outfiles into version control
if [ ! -z "$OUTFILE" ]; then
@@ -153,7 +153,7 @@ EOF
if [ "$KEYTYPE" == "ssl-self" ]; then
echo "Encrypting certificate into keyringer..."
- cat "$NODE.crt" | keyringer_exec encrypt "$BASEDIR" "$FILE.crt"
+ cat "${NODE}.crt" | keyringer_exec encrypt "$BASEDIR" "$FILE.crt"
elif [ -f "$BASEDIR/keys/$FILE.crt.asc" ]; then
# Remove any existing crt
keyringer_exec del "$BASEDIR" "$FILE.crt"
@@ -164,18 +164,18 @@ EOF
if [ ! -z "$OUTFILE" ]; then
# TODO: add outfiles into version control
mkdir -p `dirname $OUTFILE`
- printf "Saving copies at %s.pem, %s.csr and %s.crt\n" "$OUTFILE" "$OUTFILE" "$OUTFILE"
+ printf "Saving copies at %s\n" "`dirname $OUTFILE`"
cat "$TMPWORK/${NODE}_privatekey.pem" > "$OUTFILE.pem"
cat "$TMPWORK/${NODE}_csr.pem" > "$OUTFILE.csr"
- if [ -f "$TMPWORK/$NODE.crt" ]; then
- cat "$TMPWORK/$NODE.crt" > "$OUTFILE.crt"
+ if [ -f "$TMPWORK/${NODE}.crt" ]; then
+ cat "$TMPWORK/${NODE}.crt" > "$OUTFILE.crt"
fi
fi
# Show cert fingerprint
if [ "$KEYTYPE" == "ssl-self" ]; then
- openssl x509 -noout -in "$TMPWORK/$NODE.crt" -fingerprint
+ openssl x509 -noout -in "$TMPWORK/${NODE}.crt" -fingerprint
fi
echo "Done"