We are trying to port OpenSSL 3.0.7 on RTOS & getting a failure during Rand initialization. Same code/logic is working on 1.1.1 & 1.0.2 OpenSSL versions.
Can you please help us with the steps/function calls to be used for initializing rand seed in Openssl 3.0.7 Can you please help to check what could be the issue in below logic.
Code for Rand initialization in application using openssl 1.0.2 & 1.1.1
RAND_DRBG *master = NULL; master = RAND_DRBG_get0_master(); if(!master) { return 0; }
Note: RAND_DRBG_get0_master is depreciated in OpenSSL 3.0.7
Tried using RAND_get0_public() but result was failure since Master was NULL after invoking the function.
EVP_RAND_CTX *master = NULL; master = RAND_get0_public(NULL);
Here is the Code for OpenSSL 3.0+ :
Here is the code for OpenSSL 1.1. :
Use RAND_DRBG_new to obtain a random generator.