]> git.ipfire.org Git - thirdparty/openvpn.git/commit
OpenSSL: remove unreachable call to SSL_CTX_get0_privatekey()
authorAntonio Quartulli <antonio@openvpn.net>
Wed, 9 Aug 2017 07:42:37 +0000 (15:42 +0800)
committerDavid Sommerseth <davids@openvpn.net>
Fri, 11 Aug 2017 19:51:52 +0000 (21:51 +0200)
commit5b004f99d069fe0238aacbb0b3288872a4d7ae17
tree27f0d5c3f19b091c7172d47a53110354dd82be29
parent28dba48541f5b212c7510ab3b0776dc39044502a
OpenSSL: remove unreachable call to SSL_CTX_get0_privatekey()

In tls_ctx_load_ecdh_params() the SSL_CTX_get0_privatekey() function
is invoked only when "OPENSSL_VERSION_NUMBER >= 0x10002000L" and
curve_name is NULL.

However, under the very same conditions the code flow will
lead to an earlier return, thus never reaching the invocation of
SSL_CTX_get0_privatekey().

Restructure the surrounding code in order to make the if/else
block a bit easier to read and get rid of the unreachable
invocation.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Acked-by: Steffan Karger <steffan@karger.me>
Message-Id: <20170809074237.31291-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15186.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
src/openvpn/ssl_openssl.c