- fix key/cert locations in post script
This commit is contained in:
parent
06872c83d1
commit
670541ea80
19
httpd.spec
19
httpd.spec
@ -7,7 +7,7 @@
|
|||||||
Summary: Apache HTTP Server
|
Summary: Apache HTTP Server
|
||||||
Name: httpd
|
Name: httpd
|
||||||
Version: 2.0.54
|
Version: 2.0.54
|
||||||
Release: 5
|
Release: 6
|
||||||
URL: http://httpd.apache.org/
|
URL: http://httpd.apache.org/
|
||||||
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
|
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
|
||||||
Source1: index.html
|
Source1: index.html
|
||||||
@ -418,14 +418,14 @@ if [ $1 = 0 ]; then
|
|||||||
/sbin/chkconfig --del httpd
|
/sbin/chkconfig --del httpd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%define certdir %{_sysconfdir}/pki/ssl/certs
|
%define sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt
|
||||||
%define keydir %{_sysconfdir}/pki/ssl/private
|
%define sslkey %{_sysconfdir}/pki/tls/private/localhost.key
|
||||||
|
|
||||||
%post -n mod_ssl
|
%post -n mod_ssl
|
||||||
umask 077
|
umask 077
|
||||||
|
|
||||||
if [ ! -f %{keydir}/localhost.key ] ; then
|
if [ ! -f %{sslkey} ] ; then
|
||||||
%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{keydir}/localhost.key 2> /dev/null
|
%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{sslkey} 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FQDN=`hostname`
|
FQDN=`hostname`
|
||||||
@ -433,10 +433,10 @@ if [ "x${FQDN}" = "x" ]; then
|
|||||||
FQDN=localhost.localdomain
|
FQDN=localhost.localdomain
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f %{certdir}/localhost.crt ] ; then
|
if [ ! -f %{sslcert} ] ; then
|
||||||
cat << EOF | %{_bindir}/openssl req -new -key %{keydir}/localhost.key \
|
cat << EOF | %{_bindir}/openssl req -new -key %{sslkey} \
|
||||||
-x509 -days 365 -set_serial $RANDOM \
|
-x509 -days 365 -set_serial $RANDOM \
|
||||||
-out %{certdir}/localhost.crt 2>/dev/null
|
-out %{sslcert} 2>/dev/null
|
||||||
--
|
--
|
||||||
SomeState
|
SomeState
|
||||||
SomeCity
|
SomeCity
|
||||||
@ -547,6 +547,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/httpd/build/libtool
|
%{_libdir}/httpd/build/libtool
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 26 2005 Joe Orton <jorton@redhat.com> 2.0.54-6
|
||||||
|
- fix key/cert locations in post script
|
||||||
|
|
||||||
* Mon Apr 25 2005 Joe Orton <jorton@redhat.com> 2.0.54-5
|
* Mon Apr 25 2005 Joe Orton <jorton@redhat.com> 2.0.54-5
|
||||||
- create default dummy cert in /etc/pki/tls
|
- create default dummy cert in /etc/pki/tls
|
||||||
- use a pseudo-random serial number on the dummy cert
|
- use a pseudo-random serial number on the dummy cert
|
||||||
|
Loading…
Reference in New Issue
Block a user