Blame SPECS/crypto-utils.spec

4418f4
4418f4
%define crver 1.3
4418f4
4418f4
Summary: SSL certificate and key management utilities
4418f4
Name: crypto-utils
4418f4
Version: 2.4.1
4418f4
Release: 42%{?dist}
4418f4
4418f4
Group: Applications/System
4418f4
License: MIT and GPLv2+ and MPLv1.0
4418f4
4418f4
Source: crypto-rand-%{crver}.tar.gz
4418f4
Source1: genkey.pl
4418f4
Source2: certwatch.c
4418f4
Source3: certwatch.cron
4418f4
Source4: certwatch.xml
4418f4
Source5: genkey.xml
4418f4
Source6: keyrand.c
4418f4
Source7: COPYING
4418f4
Source8: keyrand.xml
4418f4
Source9: pemutil.c
4418f4
Source10: keyutil.c
4418f4
Source11: certext.c
4418f4
Source12: secutil.c
4418f4
Source14: keyutil.h
4418f4
Source15: secutil.h
4418f4
Source16: NSPRerrs.h
4418f4
Source17: SECerrs.h
4418f4
Source18: copying
4418f4
4418f4
BuildRequires: nss-devel >= 3.13.1, nss-util-devel >= 3.13.1, pkgconfig, newt-devel, xmlto
4418f4
BuildRequires: perl-devel, perl(Newt), perl(ExtUtils::MakeMaker)
4418f4
Requires: perl(Newt), nss >= 3.13.1, nss-util >= 3.13.1
4418f4
Requires: %(eval `perl -V:version`; echo "perl(:MODULE_COMPAT_$version)")
4418f4
4418f4
%description
4418f4
This package provides tools for managing and generating
4418f4
SSL certificates and keys.
4418f4
4418f4
%prep
4418f4
%setup -q -n crypto-rand-%{crver}
4418f4
4418f4
%build 
4418f4
%configure --with-newt=%{_prefix} CFLAGS="$CFLAGS -fPIC"
4418f4
make -C librand
4418f4
4418f4
cc $RPM_OPT_FLAGS -Wall -Werror -I/usr/include/nspr4 -I/usr/include/nss3 \
4418f4
   %{SOURCE2} %{SOURCE9} \
4418f4
   -o certwatch -lnspr4 -lnss3
4418f4
4418f4
cc $RPM_OPT_FLAGS -Wall -Werror -I/usr/include/nspr4 -I/usr/include/nss3 \
4418f4
   %{SOURCE10} \
4418f4
   %{SOURCE11} \
4418f4
   %{SOURCE12} \
4418f4
   -o keyutil -lplc4 -lnspr4 -lnss3
4418f4
4418f4
cc $RPM_OPT_FLAGS -Wall -Werror \
4418f4
   %{SOURCE6} -o keyrand -lnewt -lslang
4418f4
4418f4
date +"%e %B %Y" | tr -d '\n' > date.xml
4418f4
echo -n %{version} > version.xml
4418f4
4418f4
for m in %{SOURCE4} %{SOURCE5} %{SOURCE8}; do
4418f4
  cp ${m} .
4418f4
done
4418f4
for m in certwatch.xml genkey.xml keyrand.xml; do
4418f4
  xmlto man ${m}
4418f4
done
4418f4
4418f4
pushd Makerand
4418f4
perl -pi -e "s/Stronghold/Crypt/g" *
4418f4
perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr OPTIMIZE="$RPM_OPT_FLAGS" INSTALLDIRS=vendor
4418f4
make
4418f4
popd
4418f4
4418f4
%install
4418f4
sed -n '1,/^ \*\/$/p' librand/qshs.c > LICENSE.librand
4418f4
cp -p %{SOURCE7} .
4418f4
4418f4
pushd Makerand
4418f4
make install
4418f4
popd
4418f4
4418f4
find $RPM_BUILD_ROOT -name Makerand.so | xargs chmod 755
4418f4
4418f4
find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
4418f4
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
4418f4
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
4418f4
4418f4
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily \
4418f4
         $RPM_BUILD_ROOT%{_mandir}/man1 \
4418f4
         $RPM_BUILD_ROOT%{_bindir}
4418f4
4418f4
# install keyrand
4418f4
install -c -m 755 keyrand $RPM_BUILD_ROOT%{_bindir}/keyrand
4418f4
4418f4
# install certwatch
4418f4
install -c -m 755 certwatch $RPM_BUILD_ROOT%{_bindir}/certwatch
4418f4
install -c -m 755 %{SOURCE3} \
4418f4
   $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/certwatch
4418f4
for f in certwatch genkey keyrand; do 
4418f4
   install -c -m 644 ${f}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${f}.1
4418f4
done
4418f4
4418f4
# install keyutil
4418f4
install -c -m 755 keyutil $RPM_BUILD_ROOT%{_bindir}/keyutil
4418f4
4418f4
# install genkey
4418f4
sed -e "s|^\$bindir.*$|\$bindir = \"%{_bindir}\";|" \
4418f4
    -e "s|^\$ssltop.*$|\$ssltop = \"/etc/pki/tls\";|" \
4418f4
    -e "s|^\$sslconf.*$|\$sslconf = \"/etc/pki/tls/openssl.cnf\";|" \
4418f4
    -e "s|^\$cadir.*$|\$cadir = \"/etc/pki/CA\";|" \
4418f4
    -e "1s|.*|\#\!/usr/bin/perl|g" \
4418f4
    -e "s/'Challenge',/'Email','Challenge',/g" \
4418f4
    -e "/@EXTRA@/d" \
4418f4
  < %{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/genkey
4418f4
4418f4
chmod -R u+w $RPM_BUILD_ROOT
4418f4
4418f4
%files
4418f4
%defattr(-,root,root)
4418f4
%attr(0755,root,root) %{_bindir}/*
4418f4
%attr(0755,root,root) %{_sysconfdir}/cron.daily/certwatch
4418f4
%{_mandir}/man*/*
4418f4
%doc LICENSE* COPYING
4418f4
%{perl_vendorarch}/Crypt
4418f4
%{perl_vendorarch}/auto/Crypt
4418f4
4418f4
%changelog
4418f4
* Thu Feb 13 2014 Joe Orton <jorton@redhat.com> - 2.4.1-42
4418f4
- genkey: skip cert generation after CSR for OpenSSL (#1039896)
4418f4
- keyutil: fix error reporting (#1039896)
4418f4
4418f4
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.4.1-41
4418f4
- Mass rebuild 2014-01-24
4418f4
4418f4
* Wed Jan 22 2014 Joe Orton <jorton@redhat.com> - 2.4.1-40.2
4418f4
- genkey: further improvement to wording around key size (#1039896)
4418f4
4418f4
* Wed Jan 22 2014 Joe Orton <jorton@redhat.com> - 2.4.1-40.1
4418f4
- keyutil: use SHA1 as default hash in created certs (#1030470)
4418f4
- genkey: default to 2048 bit keysize (#1039896)
4418f4
4418f4
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.4.1-40
4418f4
- Mass rebuild 2013-12-27
4418f4
4418f4
* Sat Feb 23 2013 Elio Maldonado <emaldona@redhat.com> - 2.4.1-39
4418f4
- Resolves: rhbz#862430 - CVE-2012-3504 - insecure temporary file usage in genkey
4418f4
4418f4
* Thu Feb 07 2013 Jon Ciesla <limburgher@gmail.com> - 2.4.1-38
4418f4
- Merge review fixes, BZ 225666.
4418f4
4418f4
* Thu Jan 17 2013 Elio Maldonado <emaldona@redhat.com> - 2.4.1-37
4418f4
- Fix Bug 883618 - certwatch cron job library path - multilib
4418f4
4418f4
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-36
4418f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4418f4
4418f4
* Mon Jun 11 2012 Petr Pisar <ppisar@redhat.com> - 2.4.1-35
4418f4
- Perl 5.16 rebuild
4418f4
4418f4
* Sun Feb 19 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 2.4.1-34
4418f4
- Add disttag, cleanup spec
4418f4
4418f4
* Wed Feb 01 2012 Elio Maldonado <emaldona@redhat.com> - 2.4.1-33
4418f4
- Resolves: Bug 782142 - keyutil should use error string utilities provided by nss since 3.13
4418f4
- Update Requires and BuildRequires nss and nss-util mininimum versions
4418f4
- Add needed line breaks to the keyutil usage message 
4418f4
4418f4
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-32
4418f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4418f4
4418f4
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 2.4.1-31
4418f4
- Perl mass rebuild
4418f4
4418f4
* Thu Jun 23 2011 Elio Maldonado <emaldona@redhat.com> - 2.4.1-30
4418f4
- Enable building with -Werror=unused-but-set-variable flags (#716076)
4418f4
4418f4
* Sun Jun 19 2011 Marcela Mašláňová <mmaslano@redhat.com> - 2.4.1-29
4418f4
- Perl mass rebuild
4418f4
4418f4
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-28
4418f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4418f4
4418f4
* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 2.4.1-27
4418f4
- Mass rebuild with perl-5.12.0
4418f4
4418f4
* Sat Feb 13 2010 Elio Maldonado <emaldona@redhat.com> - 2.4.1-26
4418f4
- Retag
4418f4
4418f4
* Sat Feb 13 2010 Elio Maldonado <emaldona@redhat.com> - 2.4.1-25
4418f4
- Fix broken build due to change in implicit DSO Linking (#565064)
4418f4
4418f4
* Thu Oct 01 2009 Elio Maldonado<emaldona@redhat.com> - 2.4.1-23
4418f4
- Fix genkey to produce CSRs, certs, and key in ascii PEM format (#526720)
4418f4
4418f4
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-22
4418f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
4418f4
4418f4
* Thu May 21 2009 Elio Maldonado <emaldona@redhat.com> - 2.4.1-20
4418f4
- certwatch: Fixed cert suffix to be .crt as Apache expects it (#162116)
4418f4
4418f4
* Sun Mar 15 2009 Elio Maldonado <emaldona@redhat.com> - 2.4.1-18
4418f4
- certwatch: Fixed cert expiry time calculations (#473860)
4418f4
- keyutil: Fixed segfault on certificate generation and missing of key/cert pem files (#479886)
4418f4
4418f4
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-17
4418f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
4418f4
4418f4
* Fri Feb 20 2009 Elio Maldonado <emaldona@redhat.com> - 2.4.1-14
4418f4
- keyutil: Fixed bug where key pem file was not written (#473860)
4418f4
- keyutil: Fixed reverse logic that prevented output of the pem encoded key
4418f4
4418f4
* Thu Jan 29 2009 Elio Maldonado <emaldona@redhat.com> - 2.4.1-9
4418f4
- certwatch: Fixed cert expiry time calculations (#473860)
4418f4
- keyutil: Fixed segfault on certificate generation (#479886)
4418f4
- genkey: Fixed key file name extension
4418f4
4418f4
* Wed Jan 21 2009 Elio Maldonado <emaldona@redhat.com> - 2.4.1-8
4418f4
- certwatch: Fixed cert expiry time warnings off by one error (#473860)
4418f4
4418f4
* Wed Jan 21 2009 Elio Maldonado <emaldona@redhat.com> - 2.4.1-7
4418f4
- certwatch: Fixed cert expiry time warnings (#473860)
4418f4
4418f4
* Mon Jan 05 2009 Elio Maldonado <emaldona@redhat.com> - 2.4.1-6
4418f4
- genkey: fix ca key name extension
4418f4
4418f4
* Sun Dec 28 2008 Elio Maldonado <emaldona@redhat.com> - 2.4.1-5
4418f4
- genkey: fix server key name extension
4418f4
- certwatch: code cleanup
4418f4
4418f4
* Wed Dec 24 2008 Elio Maldonado <emaldona@redhat.com> - 2.4.1-4
4418f4
- Fix certwatch time calculations for expiring certificates (#473860)
4418f4
4418f4
* Mon Nov 03 2008 Elio Maldonado <emaldona@redhat.com> - 2.4.1-3
4418f4
- preauthenticate to modules using specially formatted password file
4418f4
4418f4
* Sun Oct 26 2008 Elio Maldonado <emaldona@redhat.com> - 2.4.1-2
4418f4
- enabled renewal for certs in the nss database
4418f4
- disabled renewal for certs in pem files
4418f4
- added man page examples
4418f4
- requires nss 3.12.2 or higher
4418f4
4418f4
* Tue Jun 03 2008 Elio Maldonado <emaldona@redhat.com> - 2.4-2
4418f4
- removed unneeded declaration in pemutil
4418f4
4418f4
* Tue Jun 03 2008 Elio Maldonado <emaldona@redhat.com> - 2.4-1
4418f4
- crypto-utils ported to use NSS for cryptography (#346731)
4418f4
- updated documentation accordingly
4418f4
4418f4
* Mon Mar  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.3-10
4418f4
- rebuild for new perl again
4418f4
4418f4
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.3-9
4418f4
- Autorebuild for GCC 4.3
4418f4
4418f4
* Thu Feb  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.3-8
4418f4
- rebuild for new perl
4418f4
4418f4
* Wed Dec  5 2007 Joe Orton <jorton@redhat.com> 2.3-7
4418f4
- rebuild for new OpenSSL
4418f4
4418f4
* Tue Oct 30 2007 Joe Orton <jorton@redhat.com> 2.3-6
4418f4
- genkey: wording fix
4418f4
4418f4
* Wed Oct 24 2007 Joe Orton <jorton@redhat.com> 2.3-5
4418f4
- genkey: skip the CA selection dialog; the CA-specific 
4418f4
  instructions are all out-of-date
4418f4
- man page updates, add man page for keyrand
4418f4
4418f4
* Thu Aug 23 2007 Joe Orton <jorton@redhat.com> 2.3-4
4418f4
- fix certwatch -p too
4418f4
- clarify License; package license texts
4418f4
4418f4
* Wed Aug 22 2007 Joe Orton <jorton@redhat.com> 2.3-3
4418f4
- fix certwatch -a (Tuomo Soini, #253819)
4418f4
4418f4
* Thu Mar  1 2007 Joe Orton <jorton@redhat.com> 2.3-2
4418f4
- various cleanups; require perl(Newt) throughout not newt-perl
4418f4
4418f4
* Thu Aug 17 2006 Joe Orton <jorton@redhat.com> 2.3-1
4418f4
- add GPL-licensed keyrand replacement (#20254)
4418f4
4418f4
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.2-9.2.2
4418f4
- rebuild
4418f4
4418f4
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.2-9.2.1
4418f4
- bump again for double-long bug on ppc(64)
4418f4
4418f4
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.2-9.2
4418f4
- rebuilt for new gcc4.1 snapshot and glibc changes
4418f4
4418f4
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
4418f4
- rebuilt
4418f4
4418f4
* Thu Nov 24 2005 Joe Orton <jorton@redhat.com> 2.2-9
4418f4
- rebuild for new slang
4418f4
4418f4
* Tue Nov  8 2005 Tomas Mraz <tmraz@redhat.com> - 2.2-8
4418f4
- rebuilt with new openssl
4418f4
4418f4
* Mon Oct  3 2005 Petr Rockai <prockai@redhat.com> - 2.2-7
4418f4
- rebuild against newt 0.52
4418f4
4418f4
* Thu May 26 2005 Joe Orton <jorton@redhat.com> 2.2-6
4418f4
- certwatch: use UTC time correctly (Tomas Mraz, #158703)
4418f4
4418f4
* Fri May 13 2005 Joe Orton <jorton@redhat.com> 2.2-5
4418f4
- genkey(1): fix paths to use /etc/pki
4418f4
4418f4
* Wed Apr 27 2005 Joe Orton <jorton@redhat.com> 2.2-4
4418f4
- genkey: create private key files with permissions 0400
4418f4
- genkey: tidy up error handling a little
4418f4
4418f4
* Tue Apr 26 2005 Joe Orton <jorton@redhat.com> 2.2-3
4418f4
- pass $OPTIONS to $HTTPD in certwatch.cron
4418f4
- man page tweaks
4418f4
4418f4
* Tue Apr 26 2005 Joe Orton <jorton@redhat.com> 2.2-2
4418f4
- add configuration options for certwatch (#152990)
4418f4
- allow passing options in certwatch.cron via $CERTWATCH_OPTS
4418f4
- require openssl with /etc/pki/tls
4418f4
4418f4
* Mon Apr 25 2005 Joe Orton <jorton@redhat.com> 2.2-1
4418f4
- adapt to use /etc/pki
4418f4
4418f4
* Fri Mar  4 2005 Joe Orton <jorton@redhat.com> 2.1-6
4418f4
- rebuild
4418f4
4418f4
* Tue Feb 15 2005 Joe Orton <jorton@redhat.com> 2.1-5
4418f4
- certwatch: prevent warnings for duplicate certs (#103807)
4418f4
- make /etc/cron.daily/certwatch 0755 (#141003)
4418f4
- add genkey(1) man page (#134821)
4418f4
4418f4
* Tue Oct 19 2004 Joe Orton <jorton@redhat.com> 2.1-4
4418f4
- make certwatch(1) warning distro-neutral
4418f4
- update to crypto-rand 1.1, fixing #136093
4418f4
4418f4
* Wed Oct 13 2004 Joe Orton <jorton@redhat.com> 2.1-3
4418f4
- send warnings To: root rather than root@localhost (#135533)
4418f4
4418f4
* Wed Oct  6 2004 Joe Orton <jorton@redhat.com> 2.1-2
4418f4
- add BuildRequire newt-devel, xmlto (#134695)
4418f4
4418f4
* Fri Sep 10 2004 Joe Orton <jorton@redhat.com> 2.1-1
4418f4
- add /usr/bin/certwatch
4418f4
- support --days argument to genkey (#131045)
4418f4
4418f4
* Tue Aug 17 2004 Joe Orton <jorton@redhat.com> 2.0-6
4418f4
- add perl MODULE_COMPAT requirement
4418f4
4418f4
* Mon Aug 16 2004 Joe Orton <jorton@redhat.com> 2.0-5
4418f4
- rebuild
4418f4
4418f4
* Mon Sep 15 2003 Joe Orton <jorton@redhat.com> 2.0-4
4418f4
- hide private key passwords during entry
4418f4
- fix CSR generation
4418f4
4418f4
* Mon Sep  1 2003 Joe Orton <jorton@redhat.com> 2.0-3
4418f4
- fix warnings when in UTF-8 locale
4418f4
4418f4
* Tue Aug 26 2003 Joe Orton <jorton@redhat.com> 2.0-2
4418f4
- allow upgrade from Stronghold 4.0
4418f4
4418f4
* Mon Aug  4 2003 Joe Orton <jorton@redhat.com> 2.0-1
4418f4
- update for RHEL
4418f4
4418f4
* Wed Sep 11 2002 Joe Orton <jorton@redhat.com> 1.0-12
4418f4
- rebuild
4418f4
4418f4
* Thu Aug 22 2002 Joe Orton <jorton@redhat.com> 1.0-11
4418f4
- fix location of OpenSSL configuration file in gencert
4418f4
4418f4
* Mon Jul 15 2002 Joe Orton <jorton@redhat.com> 1.0-10
4418f4
- fix getca SERVERROOT, SSLTOP expansion (#68870)
4418f4
4418f4
* Mon May 13 2002 Joe Orton <jorton@redhat.com> 1.0-9
4418f4
- improvements to genkey
4418f4
4418f4
* Mon May 13 2002 Joe Orton <jorton@redhat.com> 1.0-8
4418f4
- add php.ini handling to stronghold-config 
4418f4
4418f4
* Mon May 13 2002 Joe Orton <jorton@redhat.com> 1.0-7
4418f4
- restore stronghold-config
4418f4
4418f4
* Tue May 07 2002 Gary Benson <gbenson@redhat.com> 1.0-6
4418f4
- remove stronghold-config
4418f4
4418f4
* Tue Apr 09 2002 Gary Benson <gbenson@redhat.com> 1.0-5
4418f4
- change the group to match crypto-rand
4418f4
- change Copyright to License
4418f4
4418f4
* Mon Mar 25 2002 Gary Benson <gbenson@redhat.com> 1.0-4
4418f4
- hack to clean up some cruft that gets left in the docroot after we
4418f4
  install.
4418f4
4418f4
* Fri Mar 22 2002 Gary Benson <gbenson@redhat.com>
4418f4
- excise interchange.
4418f4
4418f4
* Wed Feb 13 2002 Gary Benson <gbenson@redhat.com> 1.0-3
4418f4
- ask about interchange too.
4418f4
- make /etc/sysconfig/httpd nicer.
4418f4
4418f4
* Thu May 17 2001 Joe Orton <jorton@redhat.com>
4418f4
- Redone for Red Hat Linux.
4418f4
4418f4
* Tue Mar 20 2001 Mark Cox <mjc@redhat.com>
4418f4
- Changes to make genkey a perl script
4418f4
4418f4
* Mon Dec 04 2000 Joe Orton <jorton@redhat.com>
4418f4
- Put the stronghold/bin -> stronghold/ssl/bin symlink in the %%files section
4418f4
  rather than creating it in %%post.
4418f4
4418f4
* Fri Nov 24 2000 Mark Cox <mjc@redhat.com>
4418f4
- No need for .configure scripts, do the substitution ourselves
4418f4
4418f4
* Tue Nov 21 2000 Mark Cox <mjc@redhat.com>
4418f4
- First version. Because this depends on a build environment
4418f4
- We won't worry about ni-scripts for now, they're not used anyhow
4418f4