summaryrefslogtreecommitdiffstats
path: root/crypto/rand
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-10-22 18:05:14 +0200
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-11-08 16:32:30 +0100
commitc39df745b08d9d9e8ae323a2b017db1961f5c0b8 (patch)
tree5e69581e1e8b3eb282297f8f2a51414e617fc3ed /crypto/rand
parentefd67e01a5471f9b0745018d7707b69876b070f6 (diff)
Test: link drbgtest statically against libcrypto
and remove duplicate rand_drbg_seedlen() implementation again. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7462) (cherry picked from commit 1c615e4ce97715ae3af9255bc57be32a49687966)
Diffstat (limited to 'crypto/rand')
-rw-r--r--crypto/rand/drbg_lib.c6
-rw-r--r--crypto/rand/rand_lcl.h2
2 files changed, 2 insertions, 6 deletions
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index c1d89f8a38..a13282181d 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -974,12 +974,8 @@ static int drbg_bytes(unsigned char *out, int count)
* Calculates the minimum length of a full entropy buffer
* which is necessary to seed (i.e. instantiate) the DRBG
* successfully.
- *
- * NOTE: There is a copy of this function in drbgtest.c.
- * If you change anything here, you need to update
- * the copy accordingly.
*/
-static size_t rand_drbg_seedlen(RAND_DRBG *drbg)
+size_t rand_drbg_seedlen(RAND_DRBG *drbg)
{
/*
* If no os entropy source is available then RAND_seed(buffer, bufsize)
diff --git a/crypto/rand/rand_lcl.h b/crypto/rand/rand_lcl.h
index 9a4dc32422..c3e9804dc0 100644
--- a/crypto/rand/rand_lcl.h
+++ b/crypto/rand/rand_lcl.h
@@ -280,7 +280,7 @@ extern int rand_fork_count;
/* DRBG helpers */
int rand_drbg_restart(RAND_DRBG *drbg,
const unsigned char *buffer, size_t len, size_t entropy);
-
+size_t rand_drbg_seedlen(RAND_DRBG *drbg);
/* locking api */
int rand_drbg_lock(RAND_DRBG *drbg);
int rand_drbg_unlock(RAND_DRBG *drbg);