electron: Client certificate not working

Hi,

The docs list --ignore-certificate-errors as a supported chromium switch. I’m trying to set up a test/integration/development environment for my apps using self-signed certificates, but am not having any luck getting this switch to work. I’m using v0.21.3 on both Linux and OS X.

My code opens BrowserWindow content fine when pointed at servers with valid certs. But for GET requests to servers without valid certs, the DevTools always show that the network request never receives any bytes. I’m assuming this (silent) failure is a result of ssl validation failure inside chromium.

I’ve tried both:

var app = require ('app');
app.commandLine.appendSwitch ('ignore-certificate-errors');
var app = require ('app');
app.commandLine.appendSwitch ('ignore-certificate-errors', 'true');

Searching the github repo for the strings ‘ignore-certificate-errors’ and kIgnoreCertificateErrors doesn’t produce any code results. I probably just don’t understand how command line switches are wired up (I’ll look more deeply), but I was wondering if this switch is, in fact, supported and whether the docs are up to date.

Thanks very much.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 2
  • Comments: 15 (8 by maintainers)

Most upvoted comments

@zcbenz I have a work project that also makes heavy use of client certificates. It would be great if they could get implemented in Electron.

While having Electron pull from the system keystore would be one step, it would also be useful if we could manually pass in a certificate that we bundle with our application. That way it wouldn’t be necessary for our clients to install a separate certificate to access our system but we could still lock down access to our server just to people who are using the application.