diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2017-11-03 20:59:16 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2018-04-02 22:22:43 +0200 |
commit | 4cffafe96786558f66e1900ac462f9ccba921132 (patch) | |
tree | f075edeb812b1ed574e6656a7f1bd312dbe5e02e /crypto/rand/randfile.c | |
parent | 1238caa725a1dfb5f9d7ef3ba3b014d2af4cab60 (diff) |
Use the private RNG for data that is not public
Reviewed-by: Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Fixes: #4641
GH: #4665
Diffstat (limited to 'crypto/rand/randfile.c')
-rw-r--r-- | crypto/rand/randfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) && \ |