summaryrefslogtreecommitdiffstats
path: root/crypto/rand
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2017-08-27 23:13:05 +0200
committerKurt Roeckx <kurt@roeckx.be>2017-08-28 23:16:26 +0200
commit58891025eff2fb42a6a5cf2fa861d46308826d07 (patch)
treed53862f86ab39ebe351219e0824427c72243de76 /crypto/rand
parent0b14a5b7ccd1618fe47d74a51c4873144c57ac83 (diff)
Make the global DRBGs static
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> GH: #4268
Diffstat (limited to 'crypto/rand')
-rw-r--r--crypto/rand/drbg_lib.c6
-rw-r--r--crypto/rand/rand_lcl.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index 3690976051..83ddc27ee5 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -15,6 +15,9 @@
#include "internal/thread_once.h"
#include "internal/rand_int.h"
+static RAND_DRBG rand_drbg; /* The default global DRBG. */
+static RAND_DRBG priv_drbg; /* The global private-key DRBG. */
+
/*
* Support framework for NIST SP 800-90A DRBG, AES-CTR mode.
* The RAND_DRBG is OpenSSL's pointer to an instance of the DRBG.
@@ -473,9 +476,6 @@ RAND_DRBG *RAND_DRBG_get0_priv_global(void)
return &priv_drbg;
}
-RAND_DRBG rand_drbg; /* The default global DRBG. */
-RAND_DRBG priv_drbg; /* The global private-key DRBG. */
-
RAND_METHOD rand_meth = {
drbg_seed,
drbg_bytes,
diff --git a/crypto/rand/rand_lcl.h b/crypto/rand/rand_lcl.h
index f9de279658..498b7e687e 100644
--- a/crypto/rand/rand_lcl.h
+++ b/crypto/rand/rand_lcl.h
@@ -144,8 +144,6 @@ struct rand_drbg_st {
/* The global RAND method, and the global buffer and DRBG instance. */
extern RAND_METHOD rand_meth;
extern RAND_BYTES_BUFFER rand_bytes;
-extern RAND_DRBG rand_drbg;
-extern RAND_DRBG priv_drbg;
/* How often we've forked (only incremented in child). */
extern int rand_fork_count;