Uh oh!
There was an error while loading. Please reload this page.
src: mark/pop OpenSSL errors in NewRootCertStore - #35514
Conversation
nodejs-github-bot
commented
Oct 6, 2020
Review requested:
|
nodejs-github-bot
commented
Oct 6, 2020
nodejs-github-bot
commented
Oct 6, 2020
Trott
commented
Oct 6, 2020
@nodejs/platform-smartos This isn't compiling successfully on SmartOS (and there's now a commit to add code to skip SmartOS). Thoughts? You can see the compilation failure in either of the first two CI runs above. |
cjihrig
commented
Oct 6, 2020
I haven't tried to debug this locally, but would |
danbev
commented
Oct 6, 2020
The function |
cjihrig
commented
Oct 6, 2020
Does it need to remain static? |
nodejs-github-bot
commented
Oct 7, 2020
danbev
commented
Oct 7, 2020
Good question, I'm not really sure if it does or not. |
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. Fixes: nodejs#35456
d806af4 to
0ab510bComparejasnell
commented
Oct 15, 2020
I think it would be fine to move the declaration into the header file |
danbev
commented
Oct 17, 2020
nodejs-github-bot
commented
Oct 18, 2020
503f592 to
9117d4fComparecodecov-io
commented
Oct 18, 2020
Codecov Report
@@ Coverage Diff @@## master #35514 +/- ##
==========================================
- Coverage 96.87% 96.40% -0.48%
==========================================
Files 212 220 +8 Lines 69641 73681 +4040 ==========================================
+ Hits 67466 71031 +3565 - Misses 2175 2650 +475
Continue to review full report at Codecov.
|
nodejs-github-bot
commented
Oct 18, 2020
danbev
commented
Oct 19, 2020
Re-run of failing node-test-commit-linux-containered/ ✔️ |
nodejs-github-bot
commented
Oct 19, 2020
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: #35514Fixes: #35456 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
danbev
commented
Oct 21, 2020
Landed in 610c68c. |
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: #35514Fixes: #35456 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit sets the OpenSSL error mark before calling
X509_STORE_load_locationsand pops the error mark afterwards.The motivation for this is that it is possible that
X509_STORE_load_locationscan produce errors if the configurationoption
--openssl-system-ca-pathfile does not exist. Later if adifferent function is called which calls an OpenSSL function it could
fail because these errors might still be on the OpenSSL error queue.
Currently, all functions that call
NewRootCertStoreclear theOpenSSL error queue upon returning, but this was not the case for
example in v12.18.0.
Fixes: #35456
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes