--use-system-ca fails to start with bad OPENSSL_CONF set
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 122k
- Forks
- 37.3k
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 283
Beschreibung
Version
26.1.0 (also seen with 22.22.2)
Platform
Microsoft Windows NT 10.0.26200.0 x64
Only windows has been tested
Subsystem
No response
What steps will reproduce the bug?
In powershell
$env:OPENSSL_CONF="c:"
node --use-system-ca
How often does it reproduce? Is there a required condition?
This happens consistently when there is a bad OPENSSL_CONF variable set
What is the expected behavior? Why is that the expected behavior?
I would expect it to fail to load some certificates/configs, but succeed with the good items in the variables and launch correctly.
What do you see instead?
PS C:\Users\farad> $env:OPENSSL_CONF="c:"
PS C:\Users\farad> node --use-system-ca
C:\Users\farad\AppData\Local\fnm_multishells\11396_1778525811252\node.exe: OpenSSL configuration error:
44190000:error:80000005:system library:BIO_new_file:Input/output error:openssl\crypto\bio\bss_file.c:67:calling fopen(c:, rb)
And node exits
Additional information
Related #58990
I can appreciate this may be openssl behaviour that cannot be controlled.
In our application we are using nodejs binaries to spawn some child processes. We want to set this flag to make the use of corporate deployed certificates easier, but have encountered an application which sets OPENSSL_CONF to a directory and causes node to fail to start.
This also appears to affect binaries built with @yao/pkg
I have checked that this is not unique to being installed through fnm
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den Windows-PowerShell-Befehl mit gesetztem OPENSSL_CONF auf "c:" und --use-system-ca zu reproduzieren. Der Bericht nennt weder eine Quelldatei noch einen Test-Einstiegspunkt; verfolge die Startbehandlung dieser Optionen durch Node und überprüfe, dass ein ungültiger Konfigurationspfad den Start nicht mehr verhindert, während das Laden von Zertifikaten für gültige Einstellungen weiterhin funktioniert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, node.js
- Bereich
- security
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100