diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2020-10-06 14:25:23 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2020-10-21 15:32:59 +0300 |
commit | 610c68c4587db1ed47a074f28a527cc24223c7a6 (patch) | |
tree | 0d0151fa35c42ee5d4866f8600d8e38abae1d4c6 /node.gyp | |
parent | a987a3256c6e5553af58fd4adcdc6aed2417e8ce (diff) |
src: mark/pop OpenSSL errors in NewRootCertStore
This commit sets the OpenSSL error mark before calling
X509_STORE_load_locations and pops the error mark afterwards.
The motivation for this is that it is possible that
X509_STORE_load_locations can produce errors if the configuration
option --openssl-system-ca-path file does not exist. Later if a
different function is called which calls an OpenSSL function it could
fail because these errors might still be on the OpenSSL error stack.
Currently, all functions that call NewRootCertStore clear the
OpenSSL error queue upon returning, but this was not the case for
example in v12.18.0.
PR-URL: https://github.com/nodejs/node/pull/35514
Fixes: https://github.com/nodejs/node/issues/35456
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'node.gyp')
-rw-r--r-- | node.gyp | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1363,6 +1363,9 @@ 'defines': [ 'HAVE_OPENSSL=1', ], + 'sources': [ + 'test/cctest/test_node_crypto.cc', + ] }], [ 'node_use_openssl=="true" and experimental_quic==1', { 'defines': [ |