diff --git a/SOURCES/libimaevm-keydesc-import.patch b/SOURCES/libimaevm-keydesc-import.patch new file mode 100644 index 0000000..fb20ebc --- /dev/null +++ b/SOURCES/libimaevm-keydesc-import.patch @@ -0,0 +1,37 @@ +diff --git a/src/libimaevm.c b/src/libimaevm.c +index 6fa0ed4..b6f9b9f 100644 +--- a/src/libimaevm.c ++++ b/src/libimaevm.c +@@ -672,12 +672,11 @@ void calc_keyid_v1(uint8_t *keyid, char *str, const unsigned char *pkey, int len + memcpy(keyid, sha1 + 12, 8); + log_debug("keyid: "); + log_debug_dump(keyid, 8); ++ id = __be64_to_cpup((__be64 *) keyid); ++ sprintf(str, "%llX", (unsigned long long)id); + +- if (params.verbose > LOG_INFO) { +- id = __be64_to_cpup((__be64 *) keyid); +- sprintf(str, "%llX", (unsigned long long)id); ++ if (params.verbose > LOG_INFO) + log_info("keyid-v1: %s\n", str); +- } + } + + void calc_keyid_v2(uint32_t *keyid, char *str, RSA *key) +@@ -694,11 +693,10 @@ void calc_keyid_v2(uint32_t *keyid, char *str, RSA *key) + memcpy(keyid, sha1 + 16, 4); + log_debug("keyid: "); + log_debug_dump(keyid, 4); ++ sprintf(str, "%x", __be32_to_cpup(keyid)); + +- if (params.verbose > LOG_INFO) { +- sprintf(str, "%x", __be32_to_cpup(keyid)); ++ if (params.verbose > LOG_INFO) + log_info("keyid: %s\n", str); +- } + + free(pkey); + } +-- +2.19.1 + diff --git a/SPECS/ima-evm-utils.spec b/SPECS/ima-evm-utils.spec index 44d9358..08cdb5d 100644 --- a/SPECS/ima-evm-utils.spec +++ b/SPECS/ima-evm-utils.spec @@ -1,13 +1,15 @@ + Summary: IMA/EVM support utilities Name: ima-evm-utils Version: 1.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Url: http://linux-ima.sourceforge.net/ Source: http://sourceforge.net/projects/linux-ima/files/ima-evm-utils/%{name}-%{version}.tar.gz BuildRequires: autoconf automake libtool m4 asciidoc libxslt BuildRequires: openssl-devel libattr-devel keyutils-libs-devel Patch1: docbook-xsl-path.patch +Patch2: libimaevm-keydesc-import.patch %description The Trusted Computing Group(TCG) run-time Integrity Measurement Architecture @@ -27,6 +29,7 @@ This package provides the header files for %{name} %prep %setup -q %patch1 -p1 +%patch2 -p1 %build mkdir -p m4 @@ -55,6 +58,9 @@ find %{buildroot}%{_libdir} -type f -name "*.la" -print -delete %{_mandir}/man1/* %changelog +* Fri Mar 01 2019 Bruno E. O. Meneguele - 1.1-3 +- Add patch to correctly handle key description on keyring during importation + * Mon Feb 26 2018 Bruno E. O. Meneguele - 1.1-2 - Add Requires for -devel subpackage