crypto: do not reach into OpenSSL internals for ThrowCryptoError
There is a perfectly serviceable ERR_get_error function which avoids having to sniff through the OpenSSL ring buffer like that. It does return the errors in the opposite order, but that's easily fixed with std::reverse. Note this behavior is slightly different in that an ERR_get_error loop will ultimately clear the error queue, but this is desirable. Leaving the error queue uncleared means errors in subsequent operations may get mixed up and cause issues. PR-URL: https://github.com/nodejs/node/pull/16701 Backport-PR-URL: https://github.com/nodejs/node/pull/18327 Reviewed-By:Ben Noordhuis <info@bnoordhuis.nl>
parent
d47cb9ab
Please register or sign in to comment