]> git.ipfire.org Git - thirdparty/bind9.git/commit
Do not remove errors from the OpenSSL error queue in toresult()
authorMichał Kępień <michal@isc.org>
Tue, 14 Aug 2018 10:49:19 +0000 (12:49 +0200)
committerMichał Kępień <michal@isc.org>
Tue, 14 Aug 2018 10:53:44 +0000 (12:53 +0200)
commit0d174c46ff4d5735d297be1e312d328b4702b4e4
tree35688987392c5188fa105629c68a349d112afe75
parent812002089ebf2c0da3d54fad1ad3e5bb607dd140
Do not remove errors from the OpenSSL error queue in toresult()

dst__openssl_toresult3() first calls toresult() and subsequently uses
ERR_get_error_line_data() in a loop.  Given this, it is a mistake to use
ERR_get_error() in toresult() because it causes the retrieved error to
be removed from the OpenSSL error queue, thus preventing it from being
retrieved by the subsequent ERR_get_error_line_data() calls.  Fix by
using ERR_peek_error() instead of ERR_get_error() in toresult().

(cherry picked from commit 36436268b5428c8b9a05524fff8338c409a67824)
lib/dns/openssl_link.c