-
Notifications
You must be signed in to change notification settings - Fork 17.1k
Electron's chromium is trusting different CAs then Electron's NodeJS #11741
Description
- Electron version: ^1.8.1
- Operating system: Windows 10 (1709)
My Windows has imported the Root CA of our company.
My localhost website is using a certificate signed by that CA.
In the electron app we open that website.
In the website we call a function within the website's code which invokes a function in the electron app, which the website's JS context has access to because of the preload.js.
Expected behavior
The website should load because windows trusts the CA and Chromium uses the Windows Cert Store.
The request() inside the preload.js function should also work for the same reason.
Actual behavior
The website loads as expected in chromium.
The request in the node context of electron fails because of an "invalid certificate"
How to reproduce
- Import a Custom CA to Windows Cert Store
- Use a cert signed by that Custom CA on a website
- Open the website with electron
- call a function inside the node context of electron to request the same website
So the question is why is electron using two different Trust Stores?
Chromium is trusting different CAs than NodeJS