]> git.ipfire.org Git - thirdparty/openssl.git/commit - crypto/err/openssl.txt
DRBG: add locking api
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Thu, 8 Feb 2018 15:40:32 +0000 (16:40 +0100)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Tue, 13 Feb 2018 16:32:54 +0000 (17:32 +0100)
commit3ce1c27b56fa9856693e5c98331cebaa2a3accfa
tree3e8e56cef80c9cc540e46c8c14c10b6b33837809
parentfcd21502737e96c031bff17fe6b6a432d07e3855
DRBG: add locking api

This commit adds three new accessors to the internal DRBG lock

   int RAND_DRBG_lock(RAND_DRBG *drbg)
   int RAND_DRBG_unlock(RAND_DRBG *drbg)
   int RAND_DRBG_enable_locking(RAND_DRBG *drbg)

The three shared DRBGs are intended to be used concurrently, so they
have locking enabled by default. It is the callers responsibility to
guard access to the shared DRBGs by calls to RAND_DRBG_lock() and
RAND_DRBG_unlock().

All other DRBG instances don't have locking enabled by default, because
they are intendended to be used by a single thread. If it is desired,
locking can be enabled by using RAND_DRBG_enable_locking().

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5294)
crypto/err/openssl.txt
crypto/rand/drbg_lib.c
crypto/rand/rand_err.c
crypto/rand/rand_lib.c
include/internal/rand.h
include/openssl/randerr.h
util/libcrypto.num