From 96152c36ecac0c1b44b9cb888092bf3a3aab08c4 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 18 Jan 2023 16:43:25 +0100 Subject: [PATCH] dnsdist: Use pdns::OpenSSL::error and decltype() As suggested by Fred (thanks!). --- pdns/libssl.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 = -- 2.47.2