|
|
7a7b1e |
#global prever rc1
|
|
|
7a7b1e |
|
|
|
7a7b1e |
Summary: Software version of a PKCS#11 Hardware Security Module
|
|
|
7a7b1e |
Name: softhsm
|
|
|
7a7b1e |
Version: 2.4.0
|
|
|
7a7b1e |
Release: %{?prever:0.}2%{?prever:.%{prever}}%{?dist}
|
|
|
7a7b1e |
License: BSD
|
|
|
7a7b1e |
Url: http://www.opendnssec.org/
|
|
|
7a7b1e |
Source: http://dist.opendnssec.org/source/%{?prever:testing/}%{name}-%{version}.tar.gz
|
|
|
7a7b1e |
Source1: http://dist.opendnssec.org/source/%{?prever:testing/}%{name}-%{version}.tar.gz.sig
|
|
|
7a7b1e |
|
|
|
7a7b1e |
Patch1: softhsm-2.3.0-reset-mutex-callbacks.patch
|
|
|
7a7b1e |
Patch2: softhsm-2.4.0-use-p11-kit-headers.patch
|
|
|
7a7b1e |
|
|
|
7a7b1e |
Group: Applications/System
|
|
|
7a7b1e |
BuildRequires: openssl-devel >= 1.0.1k-6, sqlite-devel >= 3.4.2, cppunit-devel
|
|
|
7a7b1e |
BuildRequires: gcc-c++, pkgconfig, p11-kit-devel, nss-devel
|
|
|
7a7b1e |
|
|
|
7a7b1e |
Requires(pre): shadow-utils
|
|
|
7a7b1e |
Requires: p11-kit, nss-tools
|
|
|
7a7b1e |
Requires: openssl-libs >= 1.0.1k-6
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%global _hardened_build 1
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%global softhsm_module "SoftHSM PKCS #11 Module"
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%description
|
|
|
7a7b1e |
OpenDNSSEC is providing a software implementation of a generic
|
|
|
7a7b1e |
cryptographic device with a PKCS#11 interface, the SoftHSM. SoftHSM is
|
|
|
7a7b1e |
designed to meet the requirements of OpenDNSSEC, but can also work together
|
|
|
7a7b1e |
with other cryptographic products because of the PKCS#11 interface.
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%package devel
|
|
|
7a7b1e |
Summary: Development package of softhsm that includes the header files
|
|
|
7a7b1e |
Group: Development/Libraries
|
|
|
7a7b1e |
Requires: %{name} = %{version}-%{release}, openssl-devel, sqlite-devel
|
|
|
7a7b1e |
%if 0%{?prever:1}
|
|
|
7a7b1e |
BuildRequires: autoconf, libtool, automake
|
|
|
7a7b1e |
%endif
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%description devel
|
|
|
7a7b1e |
The devel package contains the libsofthsm include files
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%prep
|
|
|
7a7b1e |
%setup -q -n %{name}-%{version}%{?prever}
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%patch1 -p1
|
|
|
7a7b1e |
%patch2 -p1
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%if 0%{?prever:1}
|
|
|
7a7b1e |
autoreconf -fiv
|
|
|
7a7b1e |
%endif
|
|
|
7a7b1e |
|
|
|
7a7b1e |
# remove softhsm/ subdir auto-added to --libdir
|
|
|
7a7b1e |
sed -i "s:full_libdir/softhsm:full_libdir:g" configure
|
|
|
7a7b1e |
%if 0%{?prever:1}
|
|
|
7a7b1e |
sed -i 's:^full_libdir=":#full_libdir=":g' configure.ac
|
|
|
7a7b1e |
%endif
|
|
|
7a7b1e |
sed -i "s:libdir)/@PACKAGE@:libdir):" Makefile.in
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%build
|
|
|
7a7b1e |
%configure --libdir=%{_libdir}/pkcs11 --with-openssl=%{_prefix} --enable-ecc --disable-gost \
|
|
|
7a7b1e |
--with-migrate --enable-visibility --with-p11-kit=%{_datadir}/p11-kit/modules/
|
|
|
7a7b1e |
|
|
|
7a7b1e |
make %{?_smp_mflags}
|
|
|
7a7b1e |
# install our copy of pk11install taken from coolkey package
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%check
|
|
|
7a7b1e |
# skip while cppunit is broken
|
|
|
7a7b1e |
#make check
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%install
|
|
|
7a7b1e |
rm -rf %{buildroot}
|
|
|
7a7b1e |
make DESTDIR=%{buildroot} install
|
|
|
7a7b1e |
|
|
|
7a7b1e |
rm %{buildroot}/%{_sysconfdir}/softhsm2.conf.sample
|
|
|
7a7b1e |
rm -f %{buildroot}/%{_libdir}/pkcs11/*a
|
|
|
7a7b1e |
mkdir -p %{buildroot}%{_includedir}/softhsm
|
|
|
7a7b1e |
cp src/lib/*.h %{buildroot}%{_includedir}/softhsm
|
|
|
7a7b1e |
mkdir -p %{buildroot}/%{_sharedstatedir}/softhsm/tokens
|
|
|
7a7b1e |
|
|
|
7a7b1e |
# leave a softlink where softhsm-1 installed its library. Programs like
|
|
|
7a7b1e |
# opendnssec have that filename in their configuration file.
|
|
|
7a7b1e |
mkdir -p %{buildroot}/%{_libdir}/softhsm/
|
|
|
7a7b1e |
ln -s ../pkcs11/libsofthsm2.so %{buildroot}/%{_libdir}/softhsm/libsofthsm.so
|
|
|
7a7b1e |
# rhbz#1272423 NSS needs it to be in the search path too
|
|
|
7a7b1e |
( cd %{buildroot}/%{_libdir} ; ln -s pkcs11/libsofthsm2.so)
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%files
|
|
|
7a7b1e |
%config(noreplace) %{_sysconfdir}/softhsm2.conf
|
|
|
7a7b1e |
%{_bindir}/*
|
|
|
7a7b1e |
%dir %{_libdir}/softhsm
|
|
|
7a7b1e |
%{_libdir}/pkcs11/libsofthsm2.so
|
|
|
7a7b1e |
%{_libdir}/libsofthsm2.so
|
|
|
7a7b1e |
%{_libdir}/softhsm/libsofthsm.so
|
|
|
7a7b1e |
%attr(0664,root,root) %{_datadir}/p11-kit/modules/softhsm2.module
|
|
|
7a7b1e |
%attr(0750,ods,ods) %dir %{_sharedstatedir}/softhsm
|
|
|
7a7b1e |
%attr(1770,ods,ods) %dir %{_sharedstatedir}/softhsm/tokens
|
|
|
7a7b1e |
%doc LICENSE README.md NEWS
|
|
|
7a7b1e |
%{_mandir}/*/*
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%files devel
|
|
|
7a7b1e |
%attr(0755,root,root) %dir %{_includedir}/softhsm
|
|
|
7a7b1e |
%{_includedir}/softhsm/*.h
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%pre
|
|
|
7a7b1e |
getent group ods >/dev/null || groupadd -r ods
|
|
|
7a7b1e |
getent passwd ods >/dev/null || \
|
|
|
7a7b1e |
useradd -r -g ods -d %{_sharedstatedir}/softhsm -s /sbin/nologin \
|
|
|
7a7b1e |
-c "softhsm private keys owner" ods
|
|
|
7a7b1e |
exit 0
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%post
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%triggerpostun -- softhsm < 2.0.0
|
|
|
7a7b1e |
if [ -f /var/softhsm/slot0.db ]; then
|
|
|
7a7b1e |
runuser -g ods ods -c 'softhsm2-migrate --db /var/softhsm/slot0.db --pin 1234 --slot 0' || :
|
|
|
7a7b1e |
fi
|
|
|
7a7b1e |
|
|
|
7a7b1e |
%changelog
|
|
|
7a7b1e |
* Fri Aug 17 2018 Alexander Bokovoy <abokovoy@redhat.com> - 2.4.0-2
|
|
|
7a7b1e |
- Replace PKCS11 headers by a more liberal version from p11-kit
|
|
|
7a7b1e |
- Fixes: rhbz#1615766
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Sat Aug 11 2018 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.4.0-1
|
|
|
7a7b1e |
- Updated to latest upstream release
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Tue Jul 31 2018 Alexander Bokovoy <abokovoy@redhat.com> - 2.3.0-4
|
|
|
7a7b1e |
- Fix crash when used as a PKCS11 library via p11-kit (#1608690)
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-3.1
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Fri Feb 02 2018 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.3.0-3
|
|
|
7a7b1e |
- Remove softhsm2-pk11install. Software modules are to be registered with
|
|
|
7a7b1e |
p11-kit as in https://fedoraproject.org/wiki/PackagingDrafts/Pkcs11Support (#1541095).
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Tue Dec 05 2017 Jakub Jelen <jjelen@redhat.com> - 2.3.0-2
|
|
|
7a7b1e |
- Add support for RSA-PSS from upstrem PR#335
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Tue Dec 05 2017 Jakub Jelen <jjelen@redhat.com> - 2.3.0-1
|
|
|
7a7b1e |
- New upstream release (#1467329)
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-2.2
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-2.1
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Tue Jun 27 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.2.0-2
|
|
|
7a7b1e |
- Increased the level of messages that go to syslog, thus softhsm
|
|
|
7a7b1e |
will no longer write on syslog when it cannot open the shared DB (#1425135)
|
|
|
7a7b1e |
- Allow users in the 'ods' group to store their keys in /var/lib/softhsm/tokens/
|
|
|
7a7b1e |
while at the same time disallow deleting other users' keys (using the
|
|
|
7a7b1e |
sticky bit). Prevent users in the 'ods' group from writing in /var/lib/softhsm.
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Thu Jun 22 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 2.2.0-1
|
|
|
7a7b1e |
- Rebased to latest upstream release
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2.1
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Fri Sep 23 2016 Paul Wouters <pwouters@redhat.com> - 2.1.0-2
|
|
|
7a7b1e |
- Resolves: rhbz#1378800 Module cleanup crash
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Mon May 16 2016 Paul Wouters <pwouters@redhat.com> - 2.1.0-1
|
|
|
7a7b1e |
- Resolves: rhbz#1244461 Updated to 2.1.0
|
|
|
7a7b1e |
- Resolves: rhbz#1272423 Softhsm PKCS#11 module not visible to NSS becasue it is not in the search path
|
|
|
7a7b1e |
- Resolves: rhbz#1177086 A marked as trusted certificate cannot be written in a softhsmv2 db
|
|
|
7a7b1e |
- Resolves: rhbz#1272453 - A marked as CA certificate cannot be written in a softhsmv2 db
|
|
|
7a7b1e |
- Removed merged in bug#162 patch
|
|
|
7a7b1e |
- Temporarily disable make check because cppunit is broken
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Thu Feb 25 2016 Paul Wouters <pwouters@redhat.com> - 2.0.0-2
|
|
|
7a7b1e |
- Resolves: rhbz#1272453 A marked as CA certificate cannot be written in a softhsmv2 db
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-1.1
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Wed Sep 02 2015 Paul Wouters <pwouters@redhat.com> - 2.0.0-1
|
|
|
7a7b1e |
- Resolves: rhbz#1244461 Update to softhsm-2.0.0
|
|
|
7a7b1e |
- Resolves: rhbz#1177086 A marked as trusted certificate cannot be written in a softhsmv2 db
|
|
|
7a7b1e |
- Resolves: rhbz#1159827 Typo in homedir in /etc/passwd
|
|
|
7a7b1e |
- Added global prever to toggle snapshot vs full release build changes
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Fri Jun 26 2015 Petr Spacek <pspacek@redhat.com> - 2.0.0rc1-3
|
|
|
7a7b1e |
- Add dependency on OpenSSL with fixed AES wrapping support
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0rc1-2
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Mon Jun 01 2015 Petr Spacek <pspacek@redhat.com> - 2.0.0rc1-1
|
|
|
7a7b1e |
- Rebase to latest upstream release
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.0.0b1-4
|
|
|
7a7b1e |
- Rebuilt for GCC 5 C++11 ABI change
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Tue Sep 30 2014 Paul Wouters <pwouters@redhat.com> - 2.0.0b1-3
|
|
|
7a7b1e |
- Add support for CKM_RSA_PKCS_OAEP key un/wrapping [Petr Spacek]
|
|
|
7a7b1e |
- Use OpenSSL EVP interface for AES key wrapping [Petr Spacek]
|
|
|
7a7b1e |
- Fix softhsm2-pk11install buid and post call
|
|
|
7a7b1e |
- Do not use --with-objectstore-backend-db (causes issues on i686)
|
|
|
7a7b1e |
- Change install directory to /usr/lib*/pkcs11/
|
|
|
7a7b1e |
- Install pkcs11 module file
|
|
|
7a7b1e |
- Use official upstream tar ball
|
|
|
7a7b1e |
- Create ods user to own softhsm/token files
|
|
|
7a7b1e |
- Enable migration tools (for softhsm-v1 installs)
|
|
|
7a7b1e |
- Add softlink for softhsm-v1 .so (needed for opendnssec's conf.xml)
|
|
|
7a7b1e |
- Require p11-kit, nss-tools, for SoftHSM PKCS #11 Module file
|
|
|
7a7b1e |
- Copy pk11install.c from coolkey package
|
|
|
7a7b1e |
- Enable hardened build
|
|
|
7a7b1e |
- Add upstream official source url
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.6-3
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.6-2
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Fri Apr 18 2014 Paul Wouters <pwouters@redhat.com> - 1.3.6-1
|
|
|
7a7b1e |
- Updated to 1.3.6 (rhbz#1070196)
|
|
|
7a7b1e |
- Provide a p11-kit module file (rhbz#1085327)
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Sun Nov 03 2013 Paul Wouters <pwouters@redhat.com> - 1.3.5-1
|
|
|
7a7b1e |
- Updated to 1.3.5 (rhbz#987721)
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Tue Jul 30 2013 Paul Wouters <pwouters@redhat.com> - 1.3.3-4
|
|
|
7a7b1e |
- Rebuilt for new botan - requires --with-botan argument
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-3
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-2
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Mon Jun 04 2012 Paul Wouters <pwouters@redhat.com> - 1.3.3-1
|
|
|
7a7b1e |
- Updated to 1.3.3
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Tue Apr 03 2012 Paul Wouters <pwouters@redhat.com> - 1.3.2-1
|
|
|
7a7b1e |
- Updated to 1.3.2.
|
|
|
7a7b1e |
- Changed user from opendnssec to ods, as used in the opendnssec package
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-4
|
|
|
7a7b1e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Thu Oct 27 2011 Paul Wouters <paul@xelerance.com> - 1.3.0-3
|
|
|
7a7b1e |
- Initial Fedora package
|
|
|
7a7b1e |
- Do not install the .a file
|
|
|
7a7b1e |
- Use a separate "opendnssec" user to own /var/sofhsm
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Tue Oct 25 2011 Paul Wouters <paul@xelerance.com> - 1.3.0-2
|
|
|
7a7b1e |
- Fix description texts w.r.t. include files
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Wed Oct 05 2011 Paul Wouters <paul@xelerance.com> - 1.3.0-1
|
|
|
7a7b1e |
- Upgraded to 1.3.0
|
|
|
7a7b1e |
|
|
|
7a7b1e |
* Thu Mar 3 2011 Paul Wouters <paul@xelerance.com> - 1.2.0-1
|
|
|
7a7b1e |
- Initial package for Fedora
|