summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-01-07 17:37:47 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-01-07 17:37:47 -0200
commita31b634f7ec127b45142dfe786a32b73055324ac (patch)
treeaea4b328cf2e284293eb3830c81361c3ffefa6a3
parent7ba83b19181d36a57aa5a0d3f6aae71c2245b8fd (diff)
downloadkeyringer-a31b634f7ec127b45142dfe786a32b73055324ac.tar.gz
keyringer-a31b634f7ec127b45142dfe786a32b73055324ac.tar.bz2
Misc fixes
-rw-r--r--lib/keyringer/functions6
-rwxr-xr-xshare/keyringer/genpair2
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index d706d5b..19d677f 100644
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -50,7 +50,11 @@ function keyringer_exec {
# Return a filename with correct extension
function keyringer_filename {
- echo `dirname $1`/`basename $1 .asc`.asc
+ if [ -z "$1" ]; then
+ return
+ else
+ echo `dirname $1`/`basename $1 .asc`.asc
+ fi
}
# Check if a folder is inside a git repository
diff --git a/share/keyringer/genpair b/share/keyringer/genpair
index 225e62e..d2cba12 100755
--- a/share/keyringer/genpair
+++ b/share/keyringer/genpair
@@ -72,7 +72,7 @@ function genpair_ssl {
echo "Encrypting private key into keyringer..."
cat $NODE"_privatekey.pem" | keyringer_exec encrypt $BASEDIR $FILE.pem
echo "Encrypting certificate request into keyringer..."
- cat $NODE"_csr.pem" | keyringer_exec encrypt $BASEDIR $FILE.csr.pem
+ cat $NODE"_csr.pem" | keyringer_exec encrypt $BASEDIR $FILE.csr
echo "Encrypting certificate into keyringer..."
cat $NODE.crt | keyringer_exec encrypt $BASEDIR $FILE.crt