diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-01-07 17:37:47 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-01-07 17:37:47 -0200 |
commit | a31b634f7ec127b45142dfe786a32b73055324ac (patch) | |
tree | aea4b328cf2e284293eb3830c81361c3ffefa6a3 | |
parent | 7ba83b19181d36a57aa5a0d3f6aae71c2245b8fd (diff) | |
download | keyringer-a31b634f7ec127b45142dfe786a32b73055324ac.tar.gz keyringer-a31b634f7ec127b45142dfe786a32b73055324ac.tar.bz2 |
Misc fixes
-rw-r--r-- | lib/keyringer/functions | 6 | ||||
-rwxr-xr-x | share/keyringer/genpair | 2 |
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 |