summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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