diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-09-14 12:46:56 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-09-14 12:46:56 +0200 |
commit | 1c36fcf8868e5c8a58a7e42016425e76e742ab8c (patch) | |
tree | 4f2b567220e4cbde7a6fe342160ddaa5a8062bbc /src | |
parent | Merge pull request #4307 (diff) | |
parent | dns_util: add new DNSSEC trust anchor for rollover (diff) | |
download | monero-1c36fcf8868e5c8a58a7e42016425e76e742ab8c.tar.xz |
Merge pull request #4309
5083614f dns_util: add new DNSSEC trust anchor for rollover (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/common/dns_utils.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index 33f60bc3c..3f2bde620 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -97,11 +97,16 @@ get_builtin_cert(void) */ /** return the built in root DS trust anchor */ -static const char* +static const char* const* get_builtin_ds(void) { - return -". IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5\n"; + static const char * const ds[] = + { + ". IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5\n", + ". IN DS 20326 8 2 E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D\n", + NULL + }; + return ds; } /************************************************************ @@ -240,7 +245,12 @@ DNSResolver::DNSResolver() : m_data(new DNSResolverData()) ub_ctx_hosts(m_data->m_ub_context, NULL); } - ub_ctx_add_ta(m_data->m_ub_context, string_copy(::get_builtin_ds())); + const char * const *ds = ::get_builtin_ds(); + while (*ds) + { + MINFO("adding trust anchor: " << *ds); + ub_ctx_add_ta(m_data->m_ub_context, string_copy(*ds++)); + } } DNSResolver::~DNSResolver() |