From ca6bb6d62658f05a6fb05ee8f396818a41ace443 Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Mon, 9 Sep 2024 23:23:57 +0000 Subject: [PATCH] fix RAND_egd_bytes's signature --- crypto/rand_extra/rand_extra.c | 4 ++-- include/openssl/rand.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/rand_extra/rand_extra.c b/crypto/rand_extra/rand_extra.c index 5ab95fc6cf..65ba63d0b3 100644 --- a/crypto/rand_extra/rand_extra.c +++ b/crypto/rand_extra/rand_extra.c @@ -46,8 +46,8 @@ int RAND_egd(const char *path) { return 255; } -int RAND_egd_bytes(const char *path) { - return 255; +int RAND_egd_bytes(const char *path, int bytes) { + return bytes; } int RAND_poll(void) { diff --git a/include/openssl/rand.h b/include/openssl/rand.h index e073297807..fddb890f0c 100644 --- a/include/openssl/rand.h +++ b/include/openssl/rand.h @@ -104,8 +104,8 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED void RAND_add(const void *buf, int num, // RAND_egd returns 255. OPENSSL_EXPORT OPENSSL_DEPRECATED int RAND_egd(const char *); -// RAND_egd_bytes returns 255. -OPENSSL_EXPORT OPENSSL_DEPRECATED int RAND_egd_bytes(const char *); +// RAND_egd_bytes returns |bytes|. +OPENSSL_EXPORT OPENSSL_DEPRECATED int RAND_egd_bytes(const char *, int bytes); // RAND_poll returns one. OPENSSL_EXPORT OPENSSL_DEPRECATED int RAND_poll(void);