From b95548d9ce1ec3e9f258ecb82099abdc95bbdd46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niels=20M=C3=B6ller?= Date: Sat, 4 Apr 2026 19:48:19 +0200 Subject: [PATCH] Fix missing const in drbg_ctr_aes256_init prototype. --- ChangeLog | 5 +++++ drbg-ctr-aes256.c | 2 +- drbg-ctr.h | 2 +- nettle.texinfo | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e670385..66dea15a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2026-04-03 Niels Möller + + * drbg-ctr-aes256.c (drbg_ctr_aes256_init): Use const for + seed_material argument. + 2026-03-19 Niels Möller * nettle.texinfo (Curve 25519 and Curve 448): Document that one diff --git a/drbg-ctr-aes256.c b/drbg-ctr-aes256.c index d9fdae89..75fba500 100644 --- a/drbg-ctr-aes256.c +++ b/drbg-ctr-aes256.c @@ -74,7 +74,7 @@ drbg_ctr_aes256_update (struct drbg_ctr_aes256_ctx *ctx, } void -drbg_ctr_aes256_init (struct drbg_ctr_aes256_ctx *ctx, uint8_t *seed_material) +drbg_ctr_aes256_init (struct drbg_ctr_aes256_ctx *ctx, const uint8_t *seed_material) { static const uint8_t zero_key[AES256_KEY_SIZE] = {0}; diff --git a/drbg-ctr.h b/drbg-ctr.h index f911d5e7..bfd4b5b0 100644 --- a/drbg-ctr.h +++ b/drbg-ctr.h @@ -56,7 +56,7 @@ struct drbg_ctr_aes256_ctx SEED_MATERIAL. */ void drbg_ctr_aes256_init (struct drbg_ctr_aes256_ctx *ctx, - uint8_t *seed_material); + const uint8_t *seed_material); /* Output N bytes of random data into DST. */ void diff --git a/nettle.texinfo b/nettle.texinfo index 59a395da..fb602106 100644 --- a/nettle.texinfo +++ b/nettle.texinfo @@ -6270,7 +6270,7 @@ Nettle defines DRBG-CTR in @file{}. The size of the seeding material. @end defvr -@deftypefun void drbg_ctr_aes256_init (struct drbg_ctr_aes256_ctx *@var{ctx}, uint8_t *@var{seed_material}) +@deftypefun void drbg_ctr_aes256_init (struct drbg_ctr_aes256_ctx *@var{ctx}, const uint8_t *@var{seed_material}) Initialize the DRBG-CTR-AES256 context using @code{DRBG_CTR_AES256_SEED_SIZE} bytes of @var{seed_material}. @end deftypefun -- 2.47.3