better error handling in httpd-ssl-gencerts (#1494556)

Resolves: rhbz#1494556
This commit is contained in:
Joe Orton 2017-09-22 15:48:42 +01:00
parent 2038991f8c
commit 10e930c744
2 changed files with 11 additions and 1 deletions

View File

@ -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 \

View File

@ -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