summaryrefslogtreecommitdiffstats
path: root/crypto/provider_core.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-10-30 15:53:22 +1000
committerPauli <paul.dale@oracle.com>2020-11-20 08:24:21 +1000
commit03bede0cc8418e056d4ac551fbdc2283e0e9491f (patch)
tree116154c3e80bb806d6becadaefc35a8e1e7013b8 /crypto/provider_core.c
parent71febb399225ec5b0f85292fe9487d507fbafb7e (diff)
rand: move the entropy source out of the FIPS provider
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/13226)
Diffstat (limited to 'crypto/provider_core.c')
-rw-r--r--crypto/provider_core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/provider_core.c b/crypto/provider_core.c
index d919a95b40..954befd4a2 100644
--- a/crypto/provider_core.c
+++ b/crypto/provider_core.c
@@ -15,6 +15,7 @@
#include <openssl/opensslv.h>
#include "crypto/cryptlib.h"
#include "crypto/evp.h" /* evp_method_store_flush */
+#include "crypto/rand.h"
#include "internal/nelem.h"
#include "internal/thread_once.h"
#include "internal/provider.h"
@@ -1074,8 +1075,7 @@ static int core_pop_error_to_mark(const OSSL_CORE_HANDLE *handle)
#endif /* FIPS_MODULE */
/*
- * Functions provided by the core. Blank line separates "families" of related
- * functions.
+ * Functions provided by the core.
*/
static const OSSL_DISPATCH core_dispatch_[] = {
{ OSSL_FUNC_CORE_GETTABLE_PARAMS, (void (*)(void))core_gettable_params },
@@ -1101,6 +1101,10 @@ static const OSSL_DISPATCH core_dispatch_[] = {
{ OSSL_FUNC_BIO_VPRINTF, (void (*)(void))BIO_vprintf },
{ OSSL_FUNC_BIO_VSNPRINTF, (void (*)(void))BIO_vsnprintf },
{ OSSL_FUNC_SELF_TEST_CB, (void (*)(void))OSSL_SELF_TEST_get_callback },
+ { OSSL_FUNC_GET_ENTROPY, (void (*)(void))ossl_rand_get_entropy },
+ { OSSL_FUNC_CLEANUP_ENTROPY, (void (*)(void))ossl_rand_cleanup_entropy },
+ { OSSL_FUNC_GET_NONCE, (void (*)(void))ossl_rand_get_nonce },
+ { OSSL_FUNC_CLEANUP_NONCE, (void (*)(void))ossl_rand_cleanup_nonce },
#endif
{ OSSL_FUNC_CRYPTO_MALLOC, (void (*)(void))CRYPTO_malloc },
{ OSSL_FUNC_CRYPTO_ZALLOC, (void (*)(void))CRYPTO_zalloc },