Unverified Commit 8cc0ea78 authored by David Benjamin's avatar David Benjamin Committed by Gibson Fahnestock
Browse files

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: default avatarBen Noordhuis <info@bnoordhuis.nl>
parent d47cb9ab
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment