fips rand: DRBG KAT self test updates to provider model.
[openssl.git] / crypto / rand / drbg_lib.c
index 80759cbfaf9d4956105f7b66aeaba9ac09c759d4..ee33cfa631c96e9220d135dedaee5d72441ae8eb 100644 (file)
@@ -7,6 +7,12 @@
  * https://www.openssl.org/source/license.html
  */
 
+/*
+ * RAND_DRBG_set is deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
 #include <string.h>
 #include <openssl/crypto.h>
 #include <openssl/err.h>
@@ -433,6 +439,7 @@ void RAND_DRBG_free(RAND_DRBG *drbg)
         return;
 
     CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RAND_DRBG, drbg, &drbg->ex_data);
+    EVP_RAND_CTX_free(drbg->rand);
     OPENSSL_free(drbg);
 }