}
}
+ if (vars.count("tls")) {
+ TLSContextParameters tlsParams;
+ std::string ciphers;
+ std::string ciphers13;
+
+ tlsParams.d_provider = boost::get<string>(vars.at("tls"));
+
+ if (vars.count("ciphers")) {
+ tlsParams.d_ciphers = boost::get<string>(vars.at("ciphers"));
+ }
+ if (vars.count("ciphers13")) {
+ tlsParams.d_ciphers13 = boost::get<string>(vars.at("ciphers13"));
+ }
+ if (vars.count("caStore")) {
+ tlsParams.d_caStore = boost::get<string>(vars.at("caStore"));
+ }
+ if (vars.count("validateCertificates")) {
+ tlsParams.d_validateCertificates = boost::get<bool>(vars.at("validateCertificates"));
+ }
+ if (vars.count("subjectName")) {
+ ret->d_tlsSubjectName = boost::get<string>(vars.at("subjectName"));
+ }
+
+ ret->d_tlsCtx = getTLSContext(tlsParams);
+ }
+
/* this needs to be done _AFTER_ the order has been set,
since the server are kept ordered inside the pool */
auto localPools = g_pools.getCopy();
checkfunc_t checkFunction;
DNSName checkName{"a.root-servers.net."};
QType checkType{QType::A};
+ std::string d_tlsSubjectName;
uint16_t checkClass{QClass::IN};
std::atomic<uint64_t> idOffset{0};
std::atomic<bool> hashesComputed{false};
socket->setNonBlocking();
gettimeofday(&d_connectionStartTime, nullptr);
- auto handler = std::make_unique<TCPIOHandler>("", socket->releaseHandle(), timeval{0,0}, d_ds->d_tlsCtx, time(nullptr));
+ auto handler = std::make_unique<TCPIOHandler>(d_ds->d_tlsSubjectName, socket->releaseHandle(), timeval{0,0}, d_ds->d_tlsCtx, time(nullptr));
handler->tryConnect(d_ds->tcpFastOpen && isFastOpenEnabled(), d_ds->remote);
d_queries = 0;