fix the self-check error in FIPS mode
(cherry picked from commit 138eaf80c73b040831a48623c96b6762a7edb144)
This commit is contained in:
parent
b91aad889a
commit
44db5ca7be
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: libgcrypt
|
Name: libgcrypt
|
||||||
Version: 1.10.2
|
Version: 1.10.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A general-purpose cryptography library
|
Summary: A general-purpose cryptography library
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://www.gnupg.org/
|
URL: https://www.gnupg.org/
|
||||||
@ -47,15 +47,19 @@ sed -i -e '/^sys_lib_dlsearch_path_spec/s,/lib /usr/lib,/usr/lib /lib64 /usr/lib
|
|||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
%check
|
%check
|
||||||
src/hmac256 %{hmackey} src/.libs/%{gcrysoname} | cut -f1 -d ' ' >src/.libs/.%{gcrysoname}.hmac
|
|
||||||
|
|
||||||
make check
|
make check
|
||||||
|
|
||||||
|
%define libpath $RPM_BUILD_ROOT%{gcrylibdir}/%{gcrysoname}.?.?
|
||||||
%define __spec_install_post \
|
%define __spec_install_post \
|
||||||
%{?__debug_package:%{__debug_install_post}} \
|
%{?__debug_package:%{__debug_install_post}} \
|
||||||
%{__arch_install_post} \
|
%{__arch_install_post} \
|
||||||
%{__os_install_post} \
|
%{__os_install_post} \
|
||||||
src/hmac256 %{hmackey} $RPM_BUILD_ROOT%{gcrylibdir}/%{gcrysoname} | cut -f1 -d ' ' >$RPM_BUILD_ROOT%{gcrylibdir}/.%{gcrysoname}.hmac \
|
cd src \
|
||||||
|
sed -i -e 's|FILE=.*|FILE=\\\$1|' gen-note-integrity.sh \
|
||||||
|
READELF=readelf AWK=awk ECHO_N="-n" bash gen-note-integrity.sh %{libpath} > %{libpath}.hmac \
|
||||||
|
objcopy --update-section .note.fdo.integrity=%{libpath}.hmac %{libpath} %{libpath}.new \
|
||||||
|
mv -f %{libpath}.new %{libpath} \
|
||||||
|
rm -f %{libpath}.hmac
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -102,7 +106,6 @@ install -m644 %{SOURCE7} $RPM_BUILD_ROOT/etc/gcrypt/random.conf
|
|||||||
%dir /etc/gcrypt
|
%dir /etc/gcrypt
|
||||||
%config(noreplace) /etc/gcrypt/random.conf
|
%config(noreplace) /etc/gcrypt/random.conf
|
||||||
%{gcrylibdir}/*.so.*
|
%{gcrylibdir}/*.so.*
|
||||||
%{gcrylibdir}/.*.so.*.hmac
|
|
||||||
%exclude %{_infodir}/dir
|
%exclude %{_infodir}/dir
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
@ -119,6 +122,12 @@ install -m644 %{SOURCE7} $RPM_BUILD_ROOT/etc/gcrypt/random.conf
|
|||||||
%{_infodir}/gcrypt.info*
|
%{_infodir}/gcrypt.info*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 12 2024 hugel <gengqihu2@h-partners.com> - 1.10.2-2
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix the self-check error in FIPS mode
|
||||||
|
|
||||||
* Mon Jul 24 2023 zhengxiaoxiao <zhengxiaoxiao2@huawei.com> - 1.10.2-1
|
* Mon Jul 24 2023 zhengxiaoxiao <zhengxiaoxiao2@huawei.com> - 1.10.2-1
|
||||||
- Type:requirements
|
- Type:requirements
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user