crypto: handle OpenSSL error queue in CipherBase
This handles all errors produced by OpenSSL within the CipherBase
class. API functions clear the error queue on return, utility functions such as InitAuthenticated()
ensure that they do not add any new errors to the queue. Previously ignored return values are now being CHECK
'd.
::Final
does not clear the error queue as there is a custom error handler in place.
Note that https://github.com/nodejs/node/pull/21287 is required for this to work, otherwise the CHECK
in line 2597 will fail.
Fixes: https://github.com/nodejs/node/issues/21281
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines