2017-06-22 19:47:29 +02:00
|
|
|
#
|
|
|
|
# spec file for package libkcapi
|
|
|
|
#
|
2023-03-06 16:22:43 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2017-06-22 19:47:29 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-12-13 18:13:37 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-06-22 19:47:29 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: libkcapi
|
2022-04-26 14:47:22 +02:00
|
|
|
Version: 1.4.0
|
2017-06-22 19:47:29 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Linux Kernel Crypto API User Space Interface Library
|
2019-12-13 18:13:37 +01:00
|
|
|
License: GPL-2.0-only
|
2017-06-22 19:47:29 +02:00
|
|
|
Group: Productivity/Security
|
2022-04-26 14:47:22 +02:00
|
|
|
URL: https://www.chronox.de/libkcapi.html
|
2020-01-17 13:58:39 +01:00
|
|
|
Source: https://www.chronox.de/libkcapi/libkcapi-%{version}.tar.xz
|
|
|
|
Source1: https://www.chronox.de/libkcapi/libkcapi-%{version}.tar.xz.asc
|
|
|
|
Source2: libkcapi.keyring
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libtool
|
2017-07-12 17:00:35 +02:00
|
|
|
BuildRequires: openssl
|
|
|
|
BuildRequires: xmlto
|
2017-06-22 19:47:29 +02:00
|
|
|
|
|
|
|
%description
|
2017-06-28 17:39:33 +02:00
|
|
|
libkcapi exports APIs so that developers need not consider the low-level
|
|
|
|
Netlink interface handling that is used for accesing the Linux kernel crypto
|
|
|
|
API.
|
2017-06-22 19:47:29 +02:00
|
|
|
|
2020-01-17 13:58:39 +01:00
|
|
|
%package -n libkcapi1
|
2017-06-22 19:47:29 +02:00
|
|
|
Summary: Linux Kernel Crypto API User Space Interface Library
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2020-01-17 13:58:39 +01:00
|
|
|
%description -n libkcapi1
|
2017-06-22 19:47:29 +02:00
|
|
|
libkcapi allows user-space to access the Linux kernel crypto API.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Linux Kernel Crypto API User Space Interface Library
|
|
|
|
Group: Development/Languages/C and C++
|
2020-01-17 13:58:39 +01:00
|
|
|
Requires: libkcapi1 = %{version}
|
2017-06-22 19:47:29 +02:00
|
|
|
|
|
|
|
%description devel
|
2017-06-28 17:39:33 +02:00
|
|
|
libkcapi exports APIs so that developers need not consider the low-level
|
|
|
|
Netlink interface handling that is used for accesing the Linux kernel crypto
|
|
|
|
API.
|
|
|
|
|
|
|
|
The library does not implement any cipher algorithms. All consumer requests are
|
|
|
|
sent to the kernel for processing. Results from the kernel crypto API are
|
|
|
|
returned to the consumer via the library API.
|
|
|
|
|
|
|
|
The kernel interface and therefore this library can be used by unprivileged
|
|
|
|
processes.
|
|
|
|
|
|
|
|
This library does not perform any memcpy for processing the cryptographic data!
|
|
|
|
The library uses scatter / gather lists to eliminate the need for moving data
|
|
|
|
around in memory.
|
2017-06-22 19:47:29 +02:00
|
|
|
|
|
|
|
%package tools
|
|
|
|
Summary: Linux Kernel Crypto API User Space Tools
|
2017-06-28 17:39:33 +02:00
|
|
|
Group: Development/Tools/Other
|
2017-06-22 19:47:29 +02:00
|
|
|
|
|
|
|
%description tools
|
|
|
|
libkcapi user space tools to access certain hash algorithms.
|
|
|
|
|
|
|
|
%prep
|
2021-08-09 10:52:30 +02:00
|
|
|
%autosetup -p1
|
2017-06-22 19:47:29 +02:00
|
|
|
|
|
|
|
%build
|
2020-01-17 13:58:39 +01:00
|
|
|
autoreconf -i
|
|
|
|
%configure \
|
|
|
|
--disable-static \
|
|
|
|
--enable-kcapi-test \
|
|
|
|
--enable-kcapi-speed \
|
|
|
|
--enable-kcapi-hasher \
|
|
|
|
--enable-kcapi-rngapp \
|
|
|
|
--enable-kcapi-encapp \
|
|
|
|
--enable-kcapi-dgstapp
|
|
|
|
|
2017-06-22 19:47:29 +02:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2021-08-09 10:52:30 +02:00
|
|
|
make install DESTDIR=%{buildroot} LIBDIR="%{_libdir}" BINDIR=/%{_libexecdir}/libkcapi/ %{?_smp_mflags}
|
2020-01-17 13:58:39 +01:00
|
|
|
rm %{buildroot}/%_libdir/libkcapi.la
|
2017-06-22 19:47:29 +02:00
|
|
|
|
2020-03-25 07:24:45 +01:00
|
|
|
mkdir -p %{buildroot}/%{_libexecdir}/libkcapi/
|
|
|
|
mv %{buildroot}/usr/bin/* %{buildroot}/%{_libexecdir}/libkcapi/
|
2020-03-25 08:11:20 +01:00
|
|
|
mv %{buildroot}/usr/bin/.??* %{buildroot}/%{_libexecdir}/libkcapi/
|
2020-03-24 15:34:15 +01:00
|
|
|
|
2017-06-30 16:09:20 +02:00
|
|
|
# Add generation of HMAC checksums of the final fipshmac fipscheck stripped binaries
|
|
|
|
%define __spec_install_post \
|
|
|
|
%{?__debug_package:%{__debug_install_post}} \
|
|
|
|
%{__arch_install_post} \
|
|
|
|
%{__os_install_post} \
|
2020-03-25 07:24:45 +01:00
|
|
|
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/fipscheck |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.fipscheck.hmac \
|
|
|
|
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/fipshmac |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.fipshmac.hmac \
|
|
|
|
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/sha1sum |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.sha1sum.hmac \
|
|
|
|
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/sha256sum |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.sha256sum.hmac \
|
|
|
|
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/sha384sum |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.sha384sum.hmac \
|
|
|
|
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/sha512sum |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.sha512sum.hmac \
|
|
|
|
openssl sha512 -hmac FIPS-FTW-RHT2009 $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/sha1hmac |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.sha1hmac.hmac \
|
|
|
|
openssl sha512 -hmac FIPS-FTW-RHT2009 $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/sha256hmac |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.sha256hmac.hmac \
|
|
|
|
openssl sha512 -hmac FIPS-FTW-RHT2009 $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/sha384hmac |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.sha384hmac.hmac \
|
|
|
|
openssl sha512 -hmac FIPS-FTW-RHT2009 $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/sha512hmac |sed -e 's/.* //;' > $RPM_BUILD_ROOT/%{_libexecdir}/libkcapi/.sha512hmac.hmac \
|
2023-03-06 16:22:43 +01:00
|
|
|
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP $RPM_BUILD_ROOT/%_libdir/libkcapi.so|sed -e 's/.* //;' > $RPM_BUILD_ROOT/%_libdir/.libkcapi.so.hmac \
|
|
|
|
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP $RPM_BUILD_ROOT/%_libdir/libkcapi.so.1|sed -e 's/.* //;' > $RPM_BUILD_ROOT/%_libdir/.libkcapi.so.1.hmac \
|
|
|
|
openssl sha256 -hmac orboDeJITITejsirpADONivirpUkvarP $RPM_BUILD_ROOT/%_libdir/libkcapi.so.%version|sed -e 's/.* //;' > $RPM_BUILD_ROOT/%_libdir/.libkcapi.so.%version.hmac \
|
2017-06-30 16:09:20 +02:00
|
|
|
%{nil}
|
|
|
|
|
2020-01-17 13:58:39 +01:00
|
|
|
%post -n libkcapi1 -p /sbin/ldconfig
|
2017-06-22 19:47:29 +02:00
|
|
|
|
2020-01-17 13:58:39 +01:00
|
|
|
%postun -n libkcapi1 -p /sbin/ldconfig
|
2017-06-22 19:47:29 +02:00
|
|
|
|
2020-01-17 13:58:39 +01:00
|
|
|
%files -n libkcapi1
|
2019-09-27 19:04:51 +02:00
|
|
|
%license COPYING
|
2020-01-17 13:58:39 +01:00
|
|
|
%doc CHANGES.md
|
|
|
|
%{_libdir}/libkcapi.so.1.*
|
|
|
|
%{_libdir}/libkcapi.so.1
|
|
|
|
%{_libdir}/.libkcapi.so.1*
|
2017-06-22 19:47:29 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/kcapi.h
|
2017-06-22 19:58:21 +02:00
|
|
|
%{_mandir}/man3/*
|
2020-01-17 13:58:39 +01:00
|
|
|
%{_libdir}/libkcapi.so
|
|
|
|
%{_libdir}/.libkcapi.so.hmac
|
|
|
|
%{_libdir}/pkgconfig/libkcapi.pc
|
2017-06-22 19:47:29 +02:00
|
|
|
|
|
|
|
%files tools
|
2020-01-17 13:58:39 +01:00
|
|
|
%dir %{_libexecdir}/libkcapi
|
2020-03-25 07:24:45 +01:00
|
|
|
%{_libexecdir}/libkcapi/*sum*
|
|
|
|
%{_libexecdir}/libkcapi/*hmac*
|
|
|
|
%{_libexecdir}/libkcapi/.*.hmac
|
2020-01-17 13:58:39 +01:00
|
|
|
%{_libexecdir}/libkcapi/kcapi
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-convenience
|
|
|
|
%{_libexecdir}/libkcapi/compile-test.sh
|
|
|
|
%{_libexecdir}/libkcapi/hasher-test.sh
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-convenience.sh
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-dgst-test.sh
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-enc-test-large
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-enc-test-large.sh
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-enc-test.sh
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-fuzz-test.sh
|
2020-03-25 08:11:20 +01:00
|
|
|
%{_libexecdir}/libkcapi/fipscheck
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-dgst
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-enc
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-rng
|
|
|
|
%{_libexecdir}/libkcapi/kcapi-speed
|
2020-01-17 13:58:39 +01:00
|
|
|
%{_libexecdir}/libkcapi/libtest.sh
|
|
|
|
%{_libexecdir}/libkcapi/test-invocation.sh
|
|
|
|
%{_libexecdir}/libkcapi/test.sh
|
|
|
|
%{_libexecdir}/libkcapi/virttest.sh
|
|
|
|
%{_mandir}/man1/kcapi*
|
2017-06-22 19:47:29 +02:00
|
|
|
|
|
|
|
%changelog
|