diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c index 8d49899ef7..d24b4f438c 100644 --- a/lib/dns/openssl_link.c +++ b/lib/dns/openssl_link.c @@ -270,7 +270,7 @@ dst__openssl_destroy(void) { static isc_result_t toresult(isc_result_t fallback) { isc_result_t result = fallback; - unsigned long err = ERR_get_error(); + unsigned long err = ERR_peek_error(); #if defined(ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED) int lib = ERR_GET_LIB(err); #endif