rpms/ntop/F-10 ntop.spec,1.2,1.3

Peter Vrabec pvrabec at fedoraproject.org
Tue Mar 3 09:20:15 UTC 2009


Author: pvrabec

Update of /cvs/extras/rpms/ntop/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20102

Modified Files:
	ntop.spec 
Log Message:
invalid certificate fix (#486725)



Index: ntop.spec
===================================================================
RCS file: /cvs/extras/rpms/ntop/F-10/ntop.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ntop.spec	22 Oct 2008 13:36:48 -0000	1.2
+++ ntop.spec	3 Mar 2009 09:19:44 -0000	1.3
@@ -1,6 +1,6 @@
 Name:           ntop
 Version:        3.3.8
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A network traffic probe similar to the UNIX top command
 Group:          Applications/Internet
 License:        GPLv2
@@ -96,6 +96,8 @@
 install -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd
 install -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd/{flows,graphics,interfaces}
 touch      $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/{addressQueue,dnsCache,fingerprint,LsWatch,macPrefix,ntop_pw,prefsCache}.db
+#remove expired certificate
+rm -rf  $RPM_BUILD_ROOT/%{_sysconfdir}/ntop/ntop-cert.pem
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -113,6 +115,26 @@
   /sbin/chkconfig --add %{name} &> /dev/null || :
 fi
 
+# create new self-signed certificate
+%define sslcert %{_sysconfdir}/ntop/ntop-cert.pem
+if [ ! -f %{sslcert} ] ; then
+ #get hosname
+ FQDN=`hostname`
+ if [ "x${FQDN}" = "x" ]; then
+    FQDN=localhost.localdomain
+ fi
+ #create key and certificate in one file
+ cat << EOF | %{_bindir}/openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout %{sslcert}  -out %{sslcert} 2>/dev/null
+--
+SomeState
+SomeCity
+SomeOrganization
+SomeOrganizationalUnit
+${FQDN}
+root@${FQDN}
+EOF
+fi
+
 %preun
 if [ $1 = 0 ]; then
   /sbin/service %{name} stop    &> /dev/null || :
@@ -154,6 +176,9 @@
 %{_localstatedir}/lib/ntop/rrd
 
 %changelog
+* Tue Mar 03 2009 Peter Vrabec <pvrabec at redhat.com> - 3.3.8-2
+- invalid certificate fix (#486725)
+
 * Wed Oct 22 2008 Rakesh Pandit <rakesh at fedoraproject.org> - 3.3.8-1
 - updated to 3.3.8, removed ntop compile patch
 




More information about the fedora-extras-commits mailing list