src: hint at OPENSSL_CONF when the OpenSSL config fails to load - #64949
src: hint at OPENSSL_CONF when the OpenSSL config fails to load#64949orgads wants to merge 1 commit into
Conversation
|
Review requested:
|
dccd16f to
1480dd6
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64949 +/- ##
========================================
Coverage 90.28% 90.29%
========================================
Files 760 760
Lines 247137 247248 +111
Branches 46617 46625 +8
========================================
+ Hits 223122 223242 +120
+ Misses 15493 15465 -28
- Partials 8522 8541 +19
🚀 New features to boost your workflow:
|
1480dd6 to
e9e2c31
Compare
|
I'm not certain hiding an error reading something that may (or may not, i haven't done that due dilligence) be a convention and openssl default is a good idea. Making the error clearer I'd have no issue with. |
The branch only fires when neither Does that address your concern? If you'd still rather not have it silent, I can print the error to stderr as a warning and continue. |
|
Setting And I don't think the FIPS argument holds — the default I'd rather keep it fatal and mention |
e9e2c31 to
d76097d
Compare
OpenSSL is initialized with CONF_MFLAGS_IGNORE_MISSING_FILE, so a missing configuration file does not prevent Node.js from starting. That flag only covers ENOENT and ENOTDIR though, so a file that exists but cannot be opened is still fatal. Running in a container where /etc/ssl is not accessible to the current user aborts startup with an error that gives no way out: OpenSSL configuration error: ...:BIO_new_file:Permission denied:...fopen(/etc/ssl/openssl.cnf, rb) There is a way out: OpenSSL skips config loading entirely when OPENSSL_CONF is set to an empty value. Say so in the error message, along with the options that select a different file, and document the empty value. Refs: nodejs#62230 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
d76097d to
0d8303f
Compare
|
You're right on both counts - Reworked: the error stays fatal, and now says to point |
|
I'd drop the |
OpenSSL is initialized with CONF_MFLAGS_IGNORE_MISSING_FILE, so a missing configuration file does not prevent Node.js from starting.
That flag only covers ENOENT and ENOTDIR though, so a file that exists but cannot be opened is still fatal. Running in a container where /etc/ssl is not accessible to the current user aborts startup with an error that gives no way out:
There is a way out: OpenSSL skips config loading entirely when OPENSSL_CONF is set to an empty value. Say so in the error message, along with the options that select a different file, and document the empty value.
Closes: #62230