From fe4b7095b3e60a16a573a2fac0568b1bdbbfef72 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 26 Jun 2015 00:29:20 +0200 Subject: [PATCH] Set has_ta before unbound context initialization --- src/context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/context.c b/src/context.c index dedfbbe8..611172e7 100644 --- a/src/context.c +++ b/src/context.c @@ -843,6 +843,9 @@ getdns_context_create_with_extended_memory_functions( /* unbound context is initialized here */ /* 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. */ + result->has_ta = priv_getdns_parse_ta_file( + NULL, result->dnssec_trust_anchors); + SSL_library_init(); result->unbound_ctx = NULL; if ((r = rebuild_ub_ctx(result))) @@ -853,9 +856,6 @@ getdns_context_create_with_extended_memory_functions( getdns_list_create_with_context(result))) goto error; - result->has_ta = priv_getdns_parse_ta_file( - NULL, result->dnssec_trust_anchors); - *context = result; return GETDNS_RETURN_GOOD; error: