diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2018-03-07 19:25:55 +0100 |
---|---|---|
committer | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-03-19 15:04:40 +0100 |
commit | 7caf122e717e79afcb986fe217e77a630b67bf4c (patch) | |
tree | 5ced62615263082ab998c18c860b44c9b442ca39 /crypto/rand/rand_lib.c | |
parent | Handle evp_tests assumption of EVP_PKEY_FLAG_AUTOARGLEN (diff) | |
download | openssl-7caf122e717e79afcb986fe217e77a630b67bf4c.tar.xz openssl-7caf122e717e79afcb986fe217e77a630b67bf4c.zip |
Make the public and private DRBG thread local
This avoids lock contention.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5547)
Diffstat (limited to '')
-rw-r--r-- | crypto/rand/rand_lib.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index dfffb84b46..defa3ecb53 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -826,10 +826,7 @@ int RAND_priv_bytes(unsigned char *buf, int num) if (drbg == NULL) return 0; - /* We have to lock the DRBG before generating bits from it. */ - rand_drbg_lock(drbg); ret = RAND_DRBG_bytes(drbg, buf, num); - rand_drbg_unlock(drbg); return ret; } |