octavia/devstack/pregenerated/regenerate-certs.sh
Miguel Angel Ajo 257848697b Fixes pregenerated certificates validity to 50y
The existing pregenerated certificates (CA) were already expired
and not working on the multinode tests. Those pregenerated
certificates are used so all the nodes share the same CA.

This patch introduces a script to regenerate the certs in the
repo too.

Change-Id: I977c29e3d5867e22efd60d6bdda8a98a26559fc9
Closes-Bug: 1633436
2016-10-14 18:05:12 +02:00

22 lines
533 B
Bash
Executable File

#!/bin/bash
GEN_DIR=/tmp/certs
rm -rf $GEN_DIR
bash ../../bin/create_certificates.sh $GEN_DIR $(pwd)/../../etc/certificates/openssl.cnf
for file in client.key client.pem ca_01.pem private/cakey.pem; do
cp -v $GEN_DIR/$file certs/$file
done
echo ""
echo Validating client cert with CA:
openssl verify -verbose -CAfile certs/ca_01.pem certs/client.pem
echo ""
echo CA expiration time:
openssl x509 -enddate -noout -in certs/ca_01.pem
echo ""
echo Client cert expiration time:
openssl x509 -enddate -noout -in certs/client.pem