From: Remi Gacogne Date: Wed, 18 Jan 2023 15:43:25 +0000 (+0100) Subject: dnsdist: Use pdns::OpenSSL::error and decltype() X-Git-Tag: dnsdist-1.8.0-rc1~106^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12435%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Use pdns::OpenSSL::error and decltype() As suggested by Fred (thanks!). --- diff --git a/pdns/libssl.cc b/pdns/libssl.cc index 4c1fa51174..e9fcba6cef 100644 --- a/pdns/libssl.cc +++ b/pdns/libssl.cc @@ -804,11 +804,10 @@ bool OpenSSLTLSTicketKey::decrypt(const unsigned char* iv, EVP_CIPHER_CTX* ectx, std::unique_ptr libssl_init_server_context(const TLSConfig& config, std::map& ocspResponses) { - auto ctx = std::unique_ptr(SSL_CTX_new(SSLv23_server_method()), SSL_CTX_free); + auto ctx = std::unique_ptr(SSL_CTX_new(SSLv23_server_method()), SSL_CTX_free); if (!ctx) { - ERR_print_errors_fp(stderr); - throw std::runtime_error("Error creating an OpenSSL server context"); + throw pdns::OpenSSL::error("Error creating an OpenSSL server context"); } int sslOptions =