From 443c6566010bbfd885474d3e4c147c88491a5c13 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 15 Nov 2017 13:11:23 +0800 Subject: [PATCH] CA store authentication for named upstreams --- src/context.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/context.c b/src/context.c index fff0ea94..c0b57b8f 100644 --- a/src/context.c +++ b/src/context.c @@ -2973,6 +2973,13 @@ getdns_context_set_upstream_recursive_servers(getdns_context *context, tls_auth_name->size); upstream->tls_auth_name [tls_auth_name->size] = '\0'; + } else if (upstream->addr_len == 0) { + (void)strncpy(upstream->tls_auth_name + , addrstr + , sizeof(upstream->tls_auth_name)); + if (strlen(addrstr) >= + sizeof(upstream->tls_auth_name)) + upstream->tls_auth_name[sizeof(upstream->tls_auth_name)-1] = 0; } if (dict && (r = getdns_dict_get_list(dict, "tls_pubkey_pinset", &pubkey_pinset)) == GETDNS_RETURN_GOOD) {