From: Frederik Wedel-Heinen Date: Tue, 30 Jun 2026 15:22:11 +0000 (+0200) Subject: Remove internal-only DRBG_STATUS enum X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=be1673815439d14abaed2ee1d7714587eb1fc085;p=thirdparty%2Fopenssl.git Remove internal-only DRBG_STATUS enum Changed internal prov_drbg_st member variable from DRBG_STATUS to int to reflect how it was actually used. Reviewed-by: Paul Dale Reviewed-by: Nikola Pajkovsky MergeDate: Fri Jul 3 19:29:47 2026 (Merged from https://github.com/openssl/openssl/pull/31745) --- diff --git a/providers/implementations/include/prov/drbg.h b/providers/implementations/include/prov/drbg.h index c93acba96e1..84494a7e0ad 100644 --- a/providers/implementations/include/prov/drbg.h +++ b/providers/implementations/include/prov/drbg.h @@ -46,13 +46,6 @@ typedef struct prov_drbg_st PROV_DRBG; -/* DRBG status values */ -typedef enum drbg_status_e { - DRBG_UNINITIALISED, - DRBG_READY, - DRBG_ERROR -} DRBG_STATUS; - /* * The state of all types of DRBGs. */ @@ -149,7 +142,11 @@ struct prov_drbg_st { unsigned int parent_reseed_counter; size_t seedlen; - DRBG_STATUS state; + /* + * state is one of: EVP_RAND_STATE_UNINITIALISED, EVP_RAND_STATE_ERROR, + * EVP_RAND_STATE_READY. + */ + int state; /* DRBG specific data */ void *data; diff --git a/test/drbgtest.c b/test/drbgtest.c index 91060cf60a9..0828ebf7b55 100644 --- a/test/drbgtest.c +++ b/test/drbgtest.c @@ -182,7 +182,7 @@ static int test_drbg_reseed(int expect_success, time_t reseed_when) { time_t before_reseed, after_reseed; - int expected_state = (expect_success ? DRBG_READY : DRBG_ERROR); + int expected_state = (expect_success ? EVP_RAND_STATE_READY : EVP_RAND_STATE_ERROR); unsigned int primary_reseed, public_reseed, private_reseed; unsigned char dummy[RANDOM_SIZE];