diff options
author | Rich Salz <rsalz@openssl.org> | 2017-08-06 18:12:28 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-08-07 08:30:28 -0400 |
commit | a35f607c9f9112c649b367d05639394fc1c30771 (patch) | |
tree | c27b67822ed2816005cae84502c5b5e2ae6aee14 /crypto/init.c | |
parent | 99801878c09404e45d8176739d3a555c41b77d0b (diff) |
Make RAND_DRBG fork-safe
Use atfork to count child forks, and reseed DRBG when the counts don't
match.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/4101)
Diffstat (limited to 'crypto/init.c')
-rw-r--r-- | crypto/init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/init.c b/crypto/init.c index e1ca88f0ca..fc01c827f3 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -704,5 +704,6 @@ void OPENSSL_fork_parent(void) void OPENSSL_fork_child(void) { + rand_fork(); } #endif |