Add RAND_priv_bytes() for private keys
authorRich Salz <rsalz@openssl.org>
Wed, 2 Aug 2017 18:00:52 +0000 (14:00 -0400)
committerRich Salz <rsalz@openssl.org>
Thu, 3 Aug 2017 14:45:17 +0000 (10:45 -0400)
commitddc6a5c8f5900959bdbdfee79e1625a3f7808acd
tree3121037aca10793706bbc4b8800b40ba305a1c06
parentae3947de09522206d61c0206a733517b10a910f8
Add RAND_priv_bytes() for private keys

Add a new global DRBG for private keys used by RAND_priv_bytes.

Add BN_priv_rand() and BN_priv_rand_range() which use RAND_priv_bytes().
Change callers to use the appropriate BN_priv... function.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/4076)
19 files changed:
crypto/bn/bn_err.c
crypto/bn/bn_gf2m.c
crypto/bn/bn_prime.c
crypto/bn/bn_rand.c
crypto/bn/bn_x931p.c
crypto/dh/dh_key.c
crypto/dsa/dsa_key.c
crypto/dsa/dsa_ossl.c
crypto/ec/ec_key.c
crypto/ec/ecdsa_ossl.c
crypto/err/openssl.txt
crypto/rand/drbg_lib.c
crypto/rand/rand_lcl.h
crypto/rand/rand_lib.c
doc/man3/RAND_bytes.pod
include/openssl/bn.h
include/openssl/bnerr.h
include/openssl/rand.h
util/libcrypto.num