summaryrefslogtreecommitdiff
path: root/genca.sh
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2011-03-29 13:51:04 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2011-03-29 13:51:04 -0700
commit592c2e5f0d0ae4aaf67e4d0e9f61a4bd41971a67 (patch)
tree95874b497662380f139a91ebce8cb894c8d6f8d2 /genca.sh
parente27399a70c004ee3bf5908edadb4c6c9893dad9c (diff)
downloadcash-592c2e5f0d0ae4aaf67e4d0e9f61a4bd41971a67.tar.gz
cash-592c2e5f0d0ae4aaf67e4d0e9f61a4bd41971a67.zip
Be more robust in the face of dumb users.
Diffstat (limited to 'genca.sh')
-rwxr-xr-xgenca.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/genca.sh b/genca.sh
index 8178cea..3af90d5 100755
--- a/genca.sh
+++ b/genca.sh
@@ -6,6 +6,11 @@ SUPPLEMENTARY_CONFIG="$1"
. ./configure.sh
+if [ -e "$CA"/ca/"$CA".key ]; then
+ echo "$CA/ca/$CA.key already exists!"
+ exit 2
+fi
+
# Certificate Authority
mkdir -pv "$CA"/ca "$CA"/certs "$CA"/signed
echo 1000 > "$CA"/ca/"$CA".serial