diff options
author | Matt Braithwaite <mab@google.com> | 2015-09-04 00:18:08 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-09-09 04:02:54 +0300 |
commit | cc2c7aa91c68d2d56f0507927dc144b89fdd1f10 (patch) | |
tree | 8b3873c237fed9b0be8e4f6844ab58c99297b4e0 /crypto/internal.h | |
parent | 443a1f65e2267f6a064cc672f934f48a9b0372d3 (diff) |
Buffer reads of urandom, if you promise no forking.
Callers that lack hardware random may obtain a speed improvement by
calling |RAND_enable_fork_unsafe_buffering|, which enables a
thread-local buffer around reads from /dev/urandom.
Change-Id: I46e675d1679b20434dd520c58ece0f888f38a241
Reviewed-on: https://boringssl-review.googlesource.com/5792
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index a502d20e..713659de 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -452,6 +452,7 @@ OPENSSL_EXPORT void CRYPTO_STATIC_MUTEX_unlock( typedef enum { OPENSSL_THREAD_LOCAL_ERR = 0, OPENSSL_THREAD_LOCAL_RAND, + OPENSSL_THREAD_LOCAL_URANDOM_BUF, OPENSSL_THREAD_LOCAL_TEST, NUM_OPENSSL_THREAD_LOCALS, } thread_local_data_t; |