Don't SSL_library_init() on every context create

It will not be called when the second bit from the set_from_os parameter is set.
This deals with issue #117
This commit is contained in:
Willem Toorop 2016-07-13 15:28:08 +02:00
parent a523838cc6
commit 9f7ceeded3
2 changed files with 5 additions and 1 deletions

View File

@ -40,6 +40,8 @@
* Bugfix: Build fails with autoconf 2.63, works with 2.68.
Thanks Robert Groenenberg
* Doxygen output for getdns.h and getdns_extra.h only
* Do not call SSL_library_init() from getdns_context_create() when
the second bit from the set_from_os parameter is set.
* 2016-03-31: Version 1.0.0b1
* openssl 1.1.0 support

View File

@ -1297,7 +1297,9 @@ getdns_context_create_with_extended_memory_functions(
/* Unbound needs SSL to be init'ed this early when TLS is used. However we
* don't know that till later so we will have to do this every time. */
SSL_library_init();
if (set_from_os & 2 == 0)
SSL_library_init();
#ifdef HAVE_LIBUNBOUND
result->unbound_ctx = NULL;
if ((r = rebuild_ub_ctx(result)))