summaryrefslogtreecommitdiff
path: root/nova/CA
diff options
context:
space:
mode:
authorSoren Hansen <soren@linux2go.dk>2011-04-05 13:16:12 +0200
committerSoren Hansen <soren@linux2go.dk>2011-04-05 13:16:12 +0200
commitd7013c9617d0740976a78ba87b1214c2b15ee702 (patch)
tree6cb2cac12d8bceb96941f5f3796a1ae5944cc2b1 /nova/CA
parentff23dd2a3b86c816da04eddc903de0c8c3141954 (diff)
downloadnova-d7013c9617d0740976a78ba87b1214c2b15ee702.tar.gz
Automatically create CA state dir, and make sure the CA scripts look for the templates in the right places.
Diffstat (limited to 'nova/CA')
-rwxr-xr-xnova/CA/geninter.sh2
-rwxr-xr-xnova/CA/genrootca.sh3
2 files changed, 3 insertions, 2 deletions
diff --git a/nova/CA/geninter.sh b/nova/CA/geninter.sh
index 1fbcc9e73e..4b7f5a55c7 100755
--- a/nova/CA/geninter.sh
+++ b/nova/CA/geninter.sh
@@ -23,7 +23,7 @@ mkdir -p projects/$NAME
cd projects/$NAME
cp ../../openssl.cnf.tmpl openssl.cnf
sed -i -e s/%USERNAME%/$NAME/g openssl.cnf
-mkdir certs crl newcerts private
+mkdir -p certs crl newcerts private
openssl req -new -x509 -extensions v3_ca -keyout private/cakey.pem -out cacert.pem -days 365 -config ./openssl.cnf -batch -nodes
echo "10" > serial
touch index.txt
diff --git a/nova/CA/genrootca.sh b/nova/CA/genrootca.sh
index 8f2c3ee3fe..091cf17fcb 100755
--- a/nova/CA/genrootca.sh
+++ b/nova/CA/genrootca.sh
@@ -20,8 +20,9 @@ if [ -f "cacert.pem" ];
then
echo "Not installing, it's already done."
else
- cp openssl.cnf.tmpl openssl.cnf
+ cp "$(dirname $0)/openssl.cnf.tmpl" openssl.cnf
sed -i -e s/%USERNAME%/ROOT/g openssl.cnf
+ mkdir -p certs crl newcerts private
openssl req -new -x509 -extensions v3_ca -keyout private/cakey.pem -out cacert.pem -days 365 -config ./openssl.cnf -batch -nodes
touch index.txt
echo "10" > serial