summaryrefslogtreecommitdiffstats
path: root/httpd-ssl-gencerts
diff options
context:
space:
mode:
Diffstat (limited to 'httpd-ssl-gencerts')
-rwxr-xr-xhttpd-ssl-gencerts18
1 files changed, 8 insertions, 10 deletions
diff --git a/httpd-ssl-gencerts b/httpd-ssl-gencerts
index 0771b73..67b6d9a 100755
--- a/httpd-ssl-gencerts
+++ b/httpd-ssl-gencerts
@@ -3,22 +3,20 @@
set -e
FQDN=`hostname`
-# A >59 char FQDN means "root@FQDN" exceeds 64-char max length for emailAddress
-if [ "x${FQDN}" = "x" -o ${#FQDN} -gt 59 ]; then
- FQDN=localhost.localdomain
+
+if test -f /etc/pki/tls/certs/localhost.crt -o \
+ -f /etc/pki/tls/private/localhost.key -o \
+ -f /etc/pki/tls/certs/localhost-ca.crt; then
+ exit 1
fi
sscg -q \
--cert-file /etc/pki/tls/certs/localhost.crt \
--cert-key-file /etc/pki/tls/private/localhost.key \
--ca-file /etc/pki/tls/certs/localhost-ca.crt \
- --hash-alg sha256 \
- --key-strength 2048 \
--lifetime 365 \
- --country "--" \
- --state SomeState \
- --locality SomeCity \
- --organization SomeOrganization \
- --organizational-unit SomeOrganizationalUnit \
--hostname $FQDN \
--email root@$FQDN
+
+# mod_ssl will send the CA cert if it's appended to the server cert.
+cat /etc/pki/tls/certs/localhost-ca.crt >> /etc/pki/tls/certs/localhost.crt