From 7e45b73d5e76200024eaff786f6ba5d967363bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20R=C3=B6hling?= Date: Tue, 14 Sep 2021 13:01:29 +0000 Subject: [PATCH] Fix compilation errors with OpenSSL 3.0 (#2154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the const correctness of DH and EC_KEY, so the codebase will compile against OpenSSL 3. However, there are a number of warnings due to deprecated functions, which are not touched by this commit and will need to get fixed separately. Signed-off-by: Timo Röhling Co-authored-by: Timo Röhling (cherry picked from commit cfc0671807e212c8710e1abd8325fb3c8a8e63ab) --- src/cpp/security/authentication/PKIDH.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/security/authentication/PKIDH.cpp b/src/cpp/security/authentication/PKIDH.cpp index 10a8185afa9..2dfcbf32d05 100644 --- a/src/cpp/security/authentication/PKIDH.cpp +++ b/src/cpp/security/authentication/PKIDH.cpp @@ -819,7 +819,7 @@ static bool store_dh_public_key( if (type == EVP_PKEY_DH) { - DH* dh = + const DH* dh = #if IS_OPENSSL_1_1 EVP_PKEY_get0_DH(dhkey); #else @@ -856,7 +856,7 @@ static bool store_dh_public_key( } else if (type == EVP_PKEY_EC) { - EC_KEY* ec = + const EC_KEY* ec = #if IS_OPENSSL_1_1 EVP_PKEY_get0_EC_KEY(dhkey); #else