diff --git a/backport-Fix-printf-usage-errors-highlighted-by-covscan.patch b/backport-Fix-printf-usage-errors-highlighted-by-covscan.patch deleted file mode 100644 index d2768b3..0000000 --- a/backport-Fix-printf-usage-errors-highlighted-by-covscan.patch +++ /dev/null @@ -1,103 +0,0 @@ -From b5ff1b7aa1f5f7c139b4b5e35be07a8d527c9336 Mon Sep 17 00:00:00 2001 -From: Simo Sorce -Date: Thu, 15 Jul 2021 07:24:37 -0400 -Subject: [PATCH] Fix printf usage errors highlighted by covscan - -More fallout from the type changes in the API. - -Signed-off-by: Simo Sorce -Signed-off-by: Stephan Mueller ---- - apps/kcapi-dgst.c | 8 ++++---- - apps/kcapi-enc.c | 2 +- - apps/kcapi-rng.c | 8 ++++---- - 3 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/apps/kcapi-dgst.c b/apps/kcapi-dgst.c -index 6e9350a..9cd99dc 100644 ---- a/apps/kcapi-dgst.c -+++ b/apps/kcapi-dgst.c -@@ -139,7 +139,7 @@ static int cipher_op(struct kcapi_handle *handle, struct opt_data *opts) - - if ((uint32_t)ret != kcapi_md_digestsize(handle)) { - dolog(KCAPI_LOG_ERR, -- "Unexpected digest output size: %d (expected %u)\n", -+ "Unexpected digest output size: %ld (expected %u)\n", - ret, kcapi_md_digestsize(handle)); - ret = -EFAULT; - goto out; -@@ -157,7 +157,7 @@ static int cipher_op(struct kcapi_handle *handle, struct opt_data *opts) - } - } - -- dolog(KCAPI_LOG_VERBOSE, "Digest of %d bytes generated\n", ret); -+ dolog(KCAPI_LOG_VERBOSE, "Digest of %ld bytes generated\n", ret); - } else { - if ((uint64_t)outsb.st_size != outlen) { - ret = ftruncate(outfd, outlen); -@@ -183,7 +183,7 @@ static int cipher_op(struct kcapi_handle *handle, struct opt_data *opts) - - if ((uint32_t)ret != kcapi_md_digestsize(handle)) { - dolog(KCAPI_LOG_ERR, -- "Unexpected digest output size: %d (expected %u)\n", -+ "Unexpected digest output size: %ld (expected %u)\n", - ret, kcapi_md_digestsize(handle)); - ret = -EFAULT; - goto out; -@@ -193,7 +193,7 @@ static int cipher_op(struct kcapi_handle *handle, struct opt_data *opts) - bin2hex(tmpbuf, kcapi_md_digestsize(handle), - (char *)outmem, outlen, 0); - -- dolog(KCAPI_LOG_VERBOSE, "Digest of %d bytes generated\n", ret); -+ dolog(KCAPI_LOG_VERBOSE, "Digest of %ld bytes generated\n", ret); - } - - out: -diff --git a/apps/kcapi-enc.c b/apps/kcapi-enc.c -index 0f92c38..20588dd 100644 ---- a/apps/kcapi-enc.c -+++ b/apps/kcapi-enc.c -@@ -273,7 +273,7 @@ static size_t outbufsize(struct kcapi_handle *handle, struct opt_data *opts, - opts->func_blocksize(handle); - } - -- dolog(KCAPI_LOG_DEBUG, "Data size expected to be generated: %u", -+ dolog(KCAPI_LOG_DEBUG, "Data size expected to be generated: %lu", - outsize); - - return outsize; -diff --git a/apps/kcapi-rng.c b/apps/kcapi-rng.c -index 1ace323..14af437 100644 ---- a/apps/kcapi-rng.c -+++ b/apps/kcapi-rng.c -@@ -84,15 +84,15 @@ static ssize_t get_random(uint8_t *buf, size_t buflen) - #ifdef HAVE_GETRANDOM - ret = getrandom(buf, buflen, 0); - dolog(KCAPI_LOG_DEBUG, -- "Accessed getrandom system call for %u bytes", buflen); -+ "Accessed getrandom system call for %lu bytes", buflen); - #elif defined __NR_getrandom - ret = syscall(__NR_getrandom, buf, buflen, 0); - dolog(KCAPI_LOG_DEBUG, -- "Accessed getrandom system call for %u bytes", buflen); -+ "Accessed getrandom system call for %lu bytes", buflen); - #else - ret = read(random_fd, buf, buflen); - dolog(KCAPI_LOG_DEBUG, -- "Accessed /dev/urandom for %u bytes", buflen); -+ "Accessed /dev/urandom for %lu bytes", buflen); - #endif - if (0 < ret) { - buflen -= (size_t)ret; -@@ -286,7 +286,7 @@ int main(int argc, char *argv[]) - ret = kcapi_rng_seed(rng, seedbuf, seedsize); - if (ret) - dolog(KCAPI_LOG_WARN, -- "User-provided seed of %lu bytes not accepted by DRNG (error: %d)", -+ "User-provided seed of %lu bytes not accepted by DRNG (error: %ld)", - (unsigned long)sizeof(buf), ret); - else - dolog(KCAPI_LOG_DEBUG, --- -1.8.3.1 - diff --git a/libkcapi-1.3.1.tar.xz b/libkcapi-1.3.1.tar.xz deleted file mode 100644 index de68981..0000000 Binary files a/libkcapi-1.3.1.tar.xz and /dev/null differ diff --git a/libkcapi-1.3.1.tar.xz.asc b/libkcapi-1.3.1.tar.xz.asc deleted file mode 100644 index 8afdbaa..0000000 --- a/libkcapi-1.3.1.tar.xz.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQEzBAABCAAdFiEEO8xD1NLIfReEtp7kQh7pNjJqwVsFAmDttB4ACgkQQh7pNjJq -wVvV4Af/X0t4iZ8ng+AaItGiK3m2Wx1UTJTA1SYTfTTUpENtePKZADG3MX/I5x5N -VVO6CTF6ADZFrwrswP+3KIwZpEsrssTEGZ54G0nLbaHTzyXvE9Ec3CPGECgjZGzM -T0ZGz0XYykWpEVqQDEFKoLs2yK5U/WYHrde5iV9CW2WHK/6VyuRvzAKzh83n5fDg -WlAWGtBQWaGdJAhduLnFx7U7clbpLCuwAZFURWPT1nUamkioT64Io2MfHx+Y9xu+ -cLLqpOBDZAk34MDA0i09psyfD+NPjtzn5i3IEZO9rs8CpFuEe+tBpoJdGpROhuz2 -9o9G2TEe8khpGuKnkAJ7G60Ggdcnmg== -=e24H ------END PGP SIGNATURE----- diff --git a/libkcapi-1.4.0.tar.xz b/libkcapi-1.4.0.tar.xz new file mode 100644 index 0000000..44f9646 Binary files /dev/null and b/libkcapi-1.4.0.tar.xz differ diff --git a/libkcapi-1.4.0.tar.xz.asc b/libkcapi-1.4.0.tar.xz.asc new file mode 100644 index 0000000..037df0e --- /dev/null +++ b/libkcapi-1.4.0.tar.xz.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCAAdFiEEO8xD1NLIfReEtp7kQh7pNjJqwVsFAmISvaAACgkQQh7pNjJq +wVv6jggAh7UpchOXZ1THbDZ0PE+YGWSr3Y3qKHMls9ixNn/RDSYxPvyZqc6pIAKQ +zVA6bGtB9kqcSexmrk2EyiUYgi1lo+5HwsfAfHBQaq7vD1S8Q/FYx/XVRv2GQfkj +/E1ivlcdcInlpn+vu+7Hei+H/IXtETh8QPwGwRI1Je84pIt7K4K4VPwWpur0su6E +oF1AFT6ldlMczsoDTCi3eP3rZWKvMmX5718W9F6eKuTkKoIiipCUxdMBy4f6YpDB +1ZmQPHjSgG4URlclQnFiGXYAbMBRHYfguJRl/HjZWSQMigRzqGSdvJR8wrfMeQzr +Bk0z0nGayzHgcC7gPz8CsAMJj5C9eQ== +=OA3o +-----END PGP SIGNATURE----- diff --git a/libkcapi.spec b/libkcapi.spec index 4d1cfae..02229f7 100644 --- a/libkcapi.spec +++ b/libkcapi.spec @@ -9,8 +9,8 @@ %endif Name: libkcapi -Version: 1.3.1 -Release: 5 +Version: 1.4.0 +Release: 1 Summary: libkcapi - Linux Kernel Crypto API User Space Interface Library License: BSD or GPLv2 @@ -19,7 +19,6 @@ Source0: http://www.chronox.de/%{name}/%{name}-%{version}.tar.xz Source1: http://www.chronox.de/%{name}/%{name}-%{version}.tar.xz.asc Patch0: libkcapi-1.1.1-lib_Fix_kcapi_handle_destroy_closing_FD_0.patch -Patch1: backport-Fix-printf-usage-errors-highlighted-by-covscan.patch BuildRequires: clang coreutils cppcheck gcc hardlink BuildRequires: libtool openssl perl systemd xmlto kernel-headers >= 4.10.0 @@ -143,7 +142,8 @@ cp -pr lib/doc/html %{buildroot}%{_pkgdocdir} # Install replacement tools, if enabled. rm -f %{buildroot}%{_bindir}/md5sum \ %{buildroot}%{_bindir}/sha*sum \ - %{buildroot}%{_bindir}/fips* + %{buildroot}%{_bindir}/fips* \ + %{buildroot}%{_bindir}/sm*sum find %{buildroot} -type f -name '*.la' -print -delete find %{buildroot} -type f -name '*.hmac' -print -delete @@ -162,6 +162,7 @@ bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha224hmac | cut -f 1 -d ' bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha256hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha256hmac.hmac bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha384hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha384hmac.hmac bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sha512hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sha512hmac.hmac +bin/kcapi-hasher -n sha512hmac %{buildroot}%{_bindir}/sm3hmac | cut -f 1 -d ' ' > %{buildroot}/%{_lib}/hmaccalc/sm3hmac.hmac hardlink -cfv %{buildroot}%{_bindir} bin/kcapi-hasher -n fipshmac -d %{buildroot}/%{_lib}/fipscheck %{buildroot}/%{_lib}/libkcapi.so.%{version} || exit 1 @@ -188,7 +189,9 @@ popd %{_sysctldir}/%{sysctl_prio}-%{name}-optmem_max.conf %{_bindir}/kcapi* %{_bindir}/sha*hmac +%{_bindir}/sm*hmac /%{_lib}/hmaccalc/sha*hmac.hmac +/%{_lib}/hmaccalc/sm*hmac.hmac %files devel %doc %{_pkgdocdir}/CHANGES.md @@ -211,6 +214,12 @@ popd %{_mandir}/man3/kcapi_*.3.* %changelog +* Wed Nov 16 2022 yixiangzhike - 1.4.0-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:Update to 1.4.0 + * Wed Jul 13 2022 yixiangzhike - 1.3.1-5 - Type:bugfix - ID:NA