Skip to content

Electron's chromium is trusting different CAs then Electron's NodeJS #11741

@sgreiner

Description

@sgreiner
  • 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions