From 5987d2a864ee5703db07e42effb40e8191abdc56 Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Tue, 15 Aug 2023 16:14:14 +0800 Subject: [PATCH] Append newline to command sha256hmac --- backport-Append-newline-to-stdout.patch | 35 +++++++++++++++++++++++++ libkcapi.spec | 9 ++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 backport-Append-newline-to-stdout.patch diff --git a/backport-Append-newline-to-stdout.patch b/backport-Append-newline-to-stdout.patch new file mode 100644 index 0000000..c264be2 --- /dev/null +++ b/backport-Append-newline-to-stdout.patch @@ -0,0 +1,35 @@ +From 8776e34e11351265f6efde0db5ecddecac3ab217 Mon Sep 17 00:00:00 2001 +From: yixiangzhike +Date: Mon, 26 Jun 2023 22:22:15 +0800 +Subject: [PATCH] Append newline to stdout + +Append newline to stdout for printing hash may be a good experience. + +Signed-off-by: yixiangzhike +Signed-off-by: Stephan Mueller +--- + apps/kcapi-hasher.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/apps/kcapi-hasher.c b/apps/kcapi-hasher.c +index 7c53f90..fd60536 100644 +--- a/apps/kcapi-hasher.c ++++ b/apps/kcapi-hasher.c +@@ -905,12 +905,14 @@ int main(int argc, char *argv[]) + .bsd_style = 0, + .hashlen = 0, + .key = KEY_FIPSCHECK, ++ .newline = 1, + }; + const struct hash_params PARAMS_SELF_HMACCALC = { + .name = NAMES_SHA512[1], + .bsd_style = 0, + .hashlen = 0, + .key = KEY_HMACCALC, ++ .newline = 1, + }; + + basec = strdup(argv[0]); +-- +2.27.0 + diff --git a/libkcapi.spec b/libkcapi.spec index 78fe167..ff02844 100644 --- a/libkcapi.spec +++ b/libkcapi.spec @@ -29,7 +29,7 @@ ln -s libkcapi.so.%{version}.hmac %{buildroot}/%{_lib}/fipscheck/libkcapi.so. Name: libkcapi Version: 1.4.0 -Release: 3 +Release: 4 Summary: libkcapi - Linux Kernel Crypto API User Space Interface Library License: BSD or GPLv2 @@ -38,6 +38,7 @@ 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-Append-newline-to-stdout.patch BuildRequires: clang coreutils cppcheck gcc hardlink BuildRequires: libtool openssl perl systemd xmlto kernel-headers >= 4.10.0 @@ -226,6 +227,12 @@ popd %{_mandir}/man3/kcapi_*.3.* %changelog +* Tue Aug 15 2023 yixiangzhike - 1.4.0-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:append newline to command /usr/bin/sha*hmac + * Tue Jul 25 2023 yixiangzhike - 1.4.0-3 - Type:bugfix - ID:NA