diff options
author | Joe Orton <jorton@redhat.com> | 2017-09-22 15:48:42 +0100 |
---|---|---|
committer | Joe Orton <jorton@redhat.com> | 2017-09-22 15:48:42 +0100 |
commit | 962c8003312ff2f026e5855e536b3073062e0f01 (patch) | |
tree | 436b53063b5c91fc942c2a2fb23bb79bf5841779 /httpd-ssl-gencerts | |
parent | eec4cf442f96fabda35399b232ef5b5206e9901f (diff) | |
download | httpd-962c8003312ff2f026e5855e536b3073062e0f01.tar.gz httpd-962c8003312ff2f026e5855e536b3073062e0f01.tar.xz httpd-962c8003312ff2f026e5855e536b3073062e0f01.zip |
better error handling in httpd-ssl-gencerts (#1494556)
Resolves: rhbz#1494556
Diffstat (limited to 'httpd-ssl-gencerts')
-rwxr-xr-x | httpd-ssl-gencerts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/httpd-ssl-gencerts b/httpd-ssl-gencerts index 22aece4..350f5b5 100755 --- a/httpd-ssl-gencerts +++ b/httpd-ssl-gencerts @@ -3,6 +3,7 @@ set -e FQDN=`hostname` +ssldotconf=/etc/httpd/conf.d/ssl.conf if test -f /etc/pki/tls/certs/localhost.crt -a \ -f /etc/pki/tls/private/localhost.key; then @@ -21,6 +22,12 @@ if test ! -f /etc/pki/tls/certs/localhost.crt -a \ exit 1 fi +if ! test -f ${ssldotconf} || \ + ! grep -q '^SSLCertificateFile /etc/pki/tls/certs/localhost.crt' ${ssldotconf} || \ + ! grep -q '^SSLCertificateKeyFile /etc/pki/tls/private/localhost.key' ${ssldotconf}; then + # Non-default configuration, do nothing. + exit 0 +fi sscg -q \ --cert-file /etc/pki/tls/certs/localhost.crt \ |