]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix OpenSSL error stack handling of tls_ctx_add_extra_certs
authorArne Schwabe <arne@rfc2549.org>
Thu, 2 Apr 2020 10:38:21 +0000 (12:38 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 2 Apr 2020 18:42:44 +0000 (20:42 +0200)
commit3608d890583549dbdbefc40ed41bf617fa518aa1
treecd8e682d2338bf7930a7a1777a8df54e13d4c093
parent09ae628027493959c733ba07c7d018c04465052c
Fix OpenSSL error stack handling of tls_ctx_add_extra_certs

Commit f67efa94 exposed that tls_ctx_add_extra_certs will always leave
an error of PEM_R_NO_START_LINE on the stack that will printed the next
time that the error is printed.

Fix this by discarding this error. Also clean up the logic to report
real error on other errors and also the no start line error if no
certificate can be found at all and it is required (--extra-certs
config option)

Patch V2: fix optional flag was flipped betwen --cert and --extra-certs
Patch V3: Make logic more easy to follow, no functional changes

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20200402103821.10347-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19685.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ssl_openssl.c