summaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_lcl.h
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-02-08 22:46:23 +0100
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-02-13 17:32:54 +0100
commit4f9dabbfe30c3539dd6cb0bd861ddb0127c11c20 (patch)
treec2db0affead1c145e520dd819a7aecf2aa897c10 /crypto/rand/rand_lcl.h
parent3ce1c27b56fa9856693e5c98331cebaa2a3accfa (diff)
DRBG: unify initialization and cleanup code
The functions drbg_setup() and drbg_cleanup() used to duplicate a lot of code from RAND_DRBG_new() and RAND_DRBG_free(). This duplication has been removed, which simplifies drbg_setup() and makes drbg_cleanup() obsolete. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5294)
Diffstat (limited to 'crypto/rand/rand_lcl.h')
-rw-r--r--crypto/rand/rand_lcl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/rand/rand_lcl.h b/crypto/rand/rand_lcl.h
index e3c0b76cde..a63b28be4e 100644
--- a/crypto/rand/rand_lcl.h
+++ b/crypto/rand/rand_lcl.h
@@ -115,6 +115,7 @@ typedef struct rand_drbg_ctr_st {
struct rand_drbg_st {
CRYPTO_RWLOCK *lock;
RAND_DRBG *parent;
+ int secure; /* 1: allocated on the secure heap, 0: otherwise */
int nid; /* the underlying algorithm */
int fork_count;
unsigned short flags; /* various external flags */