diff options
author | Matt Caswell <matt@openssl.org> | 2020-01-15 16:34:55 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-01-20 14:54:31 +0000 |
commit | 993ebac9ed38481e4d3795c437d4e98b985c68ce (patch) | |
tree | 0e30982d57fac860519fae6071b33988c7e68c11 /include | |
parent | 09a4cb9ec7ea9ccb4885588ba3e138b9f5f606c7 (diff) |
Convert rand_bytes_ex and rand_priv_bytes_ex to public functions
These were initially added as internal functions only. However they will
also need to be used by libssl as well. Therefore it make sense to move
them into the public API.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10864)
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/rand.h | 6 | ||||
-rw-r--r-- | include/openssl/rand.h | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/include/crypto/rand.h b/include/crypto/rand.h index 81bcb60508..16fa737554 100644 --- a/include/crypto/rand.h +++ b/include/crypto/rand.h @@ -186,10 +186,4 @@ void rand_pool_cleanup(void); */ void rand_pool_keep_random_devices_open(int keep); -/* Equivalent of RAND_priv_bytes() but additionally taking an OPENSSL_CTX */ -int rand_priv_bytes_ex(OPENSSL_CTX *ctx, unsigned char *buf, int num); - -/* Equivalent of RAND_bytes() but additionally taking an OPENSSL_CTX */ -int rand_bytes_ex(OPENSSL_CTX *ctx, unsigned char *buf, int num); - #endif diff --git a/include/openssl/rand.h b/include/openssl/rand.h index 1cffab7c54..574592a69f 100644 --- a/include/openssl/rand.h +++ b/include/openssl/rand.h @@ -47,6 +47,13 @@ RAND_METHOD *RAND_OpenSSL(void); # endif int RAND_bytes(unsigned char *buf, int num); int RAND_priv_bytes(unsigned char *buf, int num); + +/* Equivalent of RAND_priv_bytes() but additionally taking an OPENSSL_CTX */ +int RAND_priv_bytes_ex(OPENSSL_CTX *ctx, unsigned char *buf, int num); + +/* Equivalent of RAND_bytes() but additionally taking an OPENSSL_CTX */ +int RAND_bytes_ex(OPENSSL_CTX *ctx, unsigned char *buf, int num); + DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num)) void RAND_seed(const void *buf, int num); |