Build against GNU Nettle 4

From the NEWS file:
https://git.lysator.liu.se/nettle/nettle/-/blob/master/NEWS

	Interface changes:

	* The _digest functions for hash algorithms, MACs and AEADs no
	  longer take the desired digest size as argument, instead,
	  they always produce the full-size digest. The typedef
	  nettle_hash_digest_func has also been changed accordingly.

Fixes #697.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
This commit is contained in:
Dimitri Papadopoulos
2026-05-17 13:13:39 +02:00
parent 6e658f00ae
commit 825729868e
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@
- Limited HTTP header size to 16 KB to complement the existing 256 KB
body limit
- Fix build issue on FreeBSD (#704)
- Build against Nettle 4.
* Version 1.4.2 (released 2026-04-16)
+4
View File
@@ -51,7 +51,11 @@ void generate_hmac(size_t key_length, const uint8_t *key,
}
}
#if NETTLE_MAJOR >= 4
hmac_sha256_digest(&ctx, digest);
#else
hmac_sha256_digest(&ctx, HMAC_DIGEST_SIZE, digest);
#endif
safe_memset(&ctx, 0, sizeof(ctx));
}