[PATCH 1/2] unit: test-ecdh: Add bytes to l_getrandom wrapper

Sergey Trofimov <[email protected]> Wed, 21 May 2025 18:16:39 +0200
Newsgroups dev.linux.lists.ell
Message-ID <[email protected]>
This should have been put into the commit adding the P-521 unit test.
This test require 72 bytes of randomness, while we only have 48.
---
 unit/test-ecdh.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/unit/test-ecdh.c b/unit/test-ecdh.c
index ee50f07de11a5c4d6f0ef23e9860f40058e10b43..27f731c9753a420231d21ae7aa7b1e76b4a2c634 100644
--- a/unit/test-ecdh.c
+++ b/unit/test-ecdh.c
@@ -31,7 +31,13 @@ bool __wrap_l_getrandom(void *buf, size_t len)
 						0x7f, 0xe2, 0x8d, 0x46, 0xb0,
 						0x73, 0xcd, 0xd3, 0x6a, 0x7b,
 						0xa6, 0xd3, 0xde, 0xbf, 0x38,
-						0x96, 0xb7, 0xc3 };
+						0x96, 0xb7, 0xc3, 0xd4, 0xc1,
+						0xcf, 0x46, 0xd4, 0x35, 0x66,
+						0x04, 0x56, 0xd5, 0x61, 0x55,
+						0x52, 0x20, 0xfa, 0x18, 0x97,
+						0x5a, 0x7c, 0x76, 0x35, 0xd3,
+						0x63, 0x3e };
+
 
 	if (use_real_getrandom)
 		return __real_l_getrandom(buf, len);

-- 
2.49.0