From 4cffafe96786558f66e1900ac462f9ccba921132 Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Fri, 3 Nov 2017 20:59:16 +0100 Subject: Use the private RNG for data that is not public Reviewed-by: Dr. Matthias St. Pierre Reviewed-by: Rich Salz Fixes: #4641 GH: #4665 --- crypto/rand/randfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/rand') diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 99a3f1424c..7cac8e9eb5 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -166,7 +166,7 @@ int RAND_write_file(const char *file) #endif /* Collect enough random data. */ - if (RAND_bytes(buf, (int)sizeof(buf)) != 1) + if (RAND_priv_bytes(buf, (int)sizeof(buf)) != 1) return -1; #if defined(O_CREAT) && !defined(OPENSSL_NO_POSIX_IO) && \ -- cgit v1.2.3