]> git.ipfire.org Git - thirdparty/openvpn.git/commit
openssl: Fix compilation without deprecated OpenSSL 1.1 APIs
authorRosen Penev <rosenp@gmail.com>
Wed, 24 Jul 2019 15:29:34 +0000 (17:29 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 28 Oct 2019 19:52:37 +0000 (20:52 +0100)
commit66b93b5e708b48778a5954fdcfe708b76b947a06
tree1069237dd07cb7b3ec59fed3c515db0e4b2a133a
parent0b2b25dfa3a19aba9c99e9a55a082fe85c4ccd59
openssl: Fix compilation without deprecated OpenSSL 1.1 APIs

EVP_CIPHER_CTX_init and _cleanup were deprecated in 1.1 and both were
replaced with _reset.

EVP_CIPHER_CTX_free in OpenSSL 1.1 replaces the cleanup/free combo of
earlier OpenSSL version. And OpenSSL 1.0.2 already calls cleanup as part
of _free.

Therefore we can remove the _cleanup calls and use the OpenSSL 1.1. API
everywhere.

Also removed initialisation with OpenSSL 1.1 as it is no longer
needed and causes compilation errors when disabling deprecated APIs.

Same with SSL_CTX_set_ecdh_auto as it got removed.

Patch V3: Use EVP_CIPHER_CTX_reset instead of init/cleanup

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20190724152934.9884-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18700.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 8a01147ff77e4ae2e377744b89fbe4b6841b2bb0)
configure.ac
src/openvpn/crypto.c
src/openvpn/crypto_backend.h
src/openvpn/crypto_mbedtls.c
src/openvpn/crypto_openssl.c
src/openvpn/openssl_compat.h
src/openvpn/ssl_openssl.c