summaryrefslogtreecommitdiffstats
path: root/crypto/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-06-28 11:23:46 +0100
committerMatt Caswell <matt@openssl.org>2019-07-02 16:49:18 +0100
commit6694e51dbaecc7b331a6f0fa484d77008367c59c (patch)
treeccdf725bf70880fa175a726a9eae987515cfaa20 /crypto/include
parentf690ef151c0c3becc234daebf0418e04ff80580e (diff)
Provide rand_bytes_ex and rand_priv_bytes_ex
We provider internal versions of RAND_bytes() and RAND_priv_bytes() which have the addition of taking an OPENSSL_CTX as a parameter. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/9193)
Diffstat (limited to 'crypto/include')
-rw-r--r--crypto/include/internal/rand_int.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/include/internal/rand_int.h b/crypto/include/internal/rand_int.h
index c1e5e033bb..d964a1d407 100644
--- a/crypto/include/internal/rand_int.h
+++ b/crypto/include/internal/rand_int.h
@@ -137,4 +137,10 @@ 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