From: Otto Moerbeek Date: Fri, 5 Feb 2021 11:22:39 +0000 (+0100) Subject: Apply suggestions from code review X-Git-Tag: dnsdist-1.6.0-alpha2~59^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f224e31b80d56c319cb7c11feb9c5643f35ebdf;p=thirdparty%2Fpdns.git Apply suggestions from code review Co-authored-by: Remi Gacogne --- diff --git a/pdns/tcpiohandler.cc b/pdns/tcpiohandler.cc index 13aefa77c6..b510dd03a9 100644 --- a/pdns/tcpiohandler.cc +++ b/pdns/tcpiohandler.cc @@ -526,12 +526,12 @@ public: { handleTicketsKeyRotation(now); - return std::unique_ptr(new OpenSSLTLSConnection(socket, timeout, d_feContext)); + return std::make_unique(socket, timeout, d_feContext); } std::unique_ptr getClientConnection(const std::string& host, int socket, unsigned int timeout) override { - return std::unique_ptr(new OpenSSLTLSConnection(host, socket, timeout, d_tlsCtx.get())); + return std::make_unique(host, socket, timeout, d_tlsCtx.get()); } void rotateTicketsKey(time_t now) override @@ -1148,12 +1148,12 @@ public: ticketsKey = d_ticketsKey; } - return std::unique_ptr(new GnuTLSConnection(socket, timeout, d_creds.get(), d_priorityCache, ticketsKey, d_enableTickets)); + return std::make_unique(socket, timeout, d_creds.get(), d_priorityCache, ticketsKey, d_enableTickets); } std::unique_ptr getClientConnection(const std::string& host, int socket, unsigned int timeout) override { - return std::unique_ptr(new GnuTLSConnection(host, socket, timeout, d_creds.get(), d_priorityCache, d_validateCerts)); + return std::make_unique(host, socket, timeout, d_creds.get(), d_priorityCache, d_validateCerts); } void rotateTicketsKey(time_t now) override