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 | |
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
-rwxr-xr-x | httpd-ssl-gencerts | 7 | ||||
-rw-r--r-- | httpd.spec | 5 |
2 files changed, 11 insertions, 1 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 \ @@ -13,7 +13,7 @@ Summary: Apache HTTP Server Name: httpd Version: 2.4.27 -Release: 11%{?dist} +Release: 12%{?dist} URL: https://httpd.apache.org/ Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: index.html @@ -689,6 +689,9 @@ rm -rf $RPM_BUILD_ROOT %{_rpmconfigdir}/macros.d/macros.httpd %changelog +* Fri Sep 22 2017 Joe Orton <jorton@redhat.com> - 2.4.27-12 +- better error handling in httpd-ssl-gencerts (#1494556) + * Thu Sep 21 2017 Stephen Gallagher <sgallagh@redhat.com> - 2.4.27-11 - Require sscg 2.2.0 for creating service and CA certificates together |