import UBI nettle-3.9.1-1.el9

This commit is contained in:
eabdullin 2024-04-30 15:49:19 +00:00
parent 9bf1f506a1
commit f3762971d5
5 changed files with 23 additions and 34 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/gmp-6.2.1.tar.xz
SOURCES/nettle-3.8-hobbled.tar.xz
SOURCES/nettle-3.9.1-hobbled.tar.xz

View File

@ -1,2 +1,2 @@
0578d48607ec0e272177d175fd1807c30b00fdf2 SOURCES/gmp-6.2.1.tar.xz
c809f048a71b322453c18e30986a18e600306d77 SOURCES/nettle-3.8-hobbled.tar.xz
eda5b879d1574e895f511cfb8c9582ecb51aa7d5 SOURCES/nettle-3.9.1-hobbled.tar.xz

View File

@ -1,13 +0,0 @@
Index: nettle-3.7/Makefile.in
===================================================================
--- nettle-3.7.orig/Makefile.in
+++ nettle-3.7/Makefile.in
@@ -291,7 +291,7 @@ libhogweed.a: $(hogweed_OBJS)
%.$(OBJEXT): %.asm $(srcdir)/m4-utils.m4 $(srcdir)/asm.m4 config.m4 machine.m4
$(M4) $(srcdir)/m4-utils.m4 $(srcdir)/asm.m4 config.m4 machine.m4 $< >$*.s
- $(COMPILE) -c $*.s
+ $(COMPILE) -c -Wa,--generate-missing-build-notes=yes $*.s
%.$(OBJEXT): %.c
$(COMPILE) -c $< \

View File

@ -1,4 +1,4 @@
From 894b22e6d851512776bd62e85e749d6950ce16fc Mon Sep 17 00:00:00 2001
From 24a4cb910a51f35dff89842e8cce27f88e8e78c3 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <dueno@redhat.com>
Date: Wed, 24 Aug 2022 17:19:57 +0900
Subject: [PATCH] Clear any intermediate data allocate on stack
@ -212,10 +212,10 @@ index 892c0742..a7e0c21d 100644
+ TMP_CLEAR (k, size + ECC_GOSTDSA_SIGN_ITCH (size));
}
diff --git a/hmac.c b/hmac.c
index 6ac5e11a..0ac33bed 100644
index ea356970..6a55551b 100644
--- a/hmac.c
+++ b/hmac.c
@@ -55,6 +55,8 @@ hmac_set_key(void *outer, void *inner, void *state,
@@ -53,6 +53,8 @@ hmac_set_key(void *outer, void *inner, void *state,
{
TMP_DECL(pad, uint8_t, NETTLE_MAX_HASH_BLOCK_SIZE);
TMP_ALLOC(pad, hash->block_size);
@ -224,7 +224,7 @@ index 6ac5e11a..0ac33bed 100644
hash->init(outer);
hash->init(inner);
@@ -64,9 +66,6 @@ hmac_set_key(void *outer, void *inner, void *state,
@@ -62,9 +64,6 @@ hmac_set_key(void *outer, void *inner, void *state,
/* Reduce key to the algorithm's hash size. Use the area pointed
* to by state for the temporary state. */
@ -234,7 +234,7 @@ index 6ac5e11a..0ac33bed 100644
hash->init(state);
hash->update(state, key_length, key);
hash->digest(state, hash->digest_size, digest);
@@ -88,6 +87,9 @@ hmac_set_key(void *outer, void *inner, void *state,
@@ -86,6 +85,9 @@ hmac_set_key(void *outer, void *inner, void *state,
hash->update(inner, hash->block_size, pad);
memcpy(state, inner, hash->context_size);
@ -244,7 +244,7 @@ index 6ac5e11a..0ac33bed 100644
}
void
@@ -114,4 +116,6 @@ hmac_digest(const void *outer, const void *inner, void *state,
@@ -112,4 +114,6 @@ hmac_digest(const void *outer, const void *inner, void *state,
hash->digest(state, length, dst);
memcpy(state, inner, hash->context_size);
@ -252,10 +252,10 @@ index 6ac5e11a..0ac33bed 100644
+ TMP_CLEAR(digest, hash->digest_size);
}
diff --git a/nettle-internal.h b/nettle-internal.h
index ddc483de..9fc55514 100644
index c41f3ee0..62b89e11 100644
--- a/nettle-internal.h
+++ b/nettle-internal.h
@@ -72,6 +72,11 @@
@@ -76,6 +76,11 @@
do { assert((size_t)(size) <= (sizeof(name))); } while (0)
#endif
@ -264,8 +264,8 @@ index ddc483de..9fc55514 100644
+#define TMP_CLEAR(name, size) (explicit_bzero (name, sizeof (*name) * (size)))
+#define TMP_CLEAR_ALIGN(name, size) (explicit_bzero (name, size))
+
/* Arbitrary limits which apply to systems that don't have alloca */
#define NETTLE_MAX_HASH_BLOCK_SIZE 128
/* Limits that apply to systems that don't have alloca */
#define NETTLE_MAX_HASH_BLOCK_SIZE 144 /* For sha3_224*/
#define NETTLE_MAX_HASH_DIGEST_SIZE 64
diff --git a/pbkdf2.c b/pbkdf2.c
index 291d138a..a8ecba5b 100644
@ -330,5 +330,5 @@ index d28e7b13..8106ebf2 100644
return ret;
}
--
2.37.2
2.41.0

View File

@ -14,8 +14,8 @@
%bcond_without fips
Name: nettle
Version: 3.8
Release: 3%{?dist}
Version: 3.9.1
Release: 1%{?dist}
Summary: A low-level cryptographic library
License: LGPLv3+ or GPLv2+
@ -26,7 +26,6 @@ Source0: %{name}-%{version}-hobbled.tar.xz
Source1: %{name}-%{version_old}-hobbled.tar.xz
Source2: nettle-3.5-remove-ecc-testsuite.patch
%endif
Patch: nettle-3.4-annocheck.patch
Patch: nettle-3.8-zeroize-stack.patch
Source100: gmp-6.2.1.tar.xz
@ -87,15 +86,11 @@ patch -p1 < %{SOURCE2}
# Disable -ggdb3 which makes debugedit unhappy
sed s/ggdb3/g/ -i configure
sed 's/ecc-192.c//g' -i Makefile.in
sed 's/ecc-224.c//g' -i Makefile.in
popd
%endif
# Disable -ggdb3 which makes debugedit unhappy
sed s/ggdb3/g/ -i configure
sed 's/ecc-secp192r1.c//g' -i Makefile.in
sed 's/ecc-secp224r1.c//g' -i Makefile.in
%build
%if %{with fips}
@ -108,12 +103,16 @@ popd
autoreconf -ifv
export ASM_FLAGS="-Wa,--generate-missing-build-notes=yes"
%configure --enable-shared --enable-fat \
%if %{with fips}
--with-include-path=$PWD/bundled_gmp --with-lib-path=$PWD/bundled_gmp/.libs \
%endif
%{nil}
unset ASM_FLAGS
%make_build
%if 0%{?bootstrap}
@ -205,6 +204,9 @@ make check
%changelog
* Wed Nov 1 2023 Daiki Ueno <dueno@redhat.com> - 3.9.1-1
- Update to nettle 3.9.1 (RHEL-14890)
* Thu Aug 25 2022 Daiki Ueno <dueno@redhat.com> - 3.8-3
- Rebuild in new side-tag
@ -213,7 +215,7 @@ make check
- Zeroize stack allocated intermediate data
* Tue Jun 28 2022 Daiki Ueno <dueno@redhat.com> - 3.8-1
- Update to nettle 3.8 (#2100350)
- Update to nettle 3.8 (#1992457)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.7.3-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags