electron: [Bug]: Import Certificate doesn't set SSL Trust bit in nssdb (app.importCertificate)

Preflight Checklist

Electron Version

13.1.4

What operating system are you using?

Ubuntu

Operating System Version

20.04.3 LTS

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

On running this command,

certutil -d sql:$HOME/.pki/nssdb -L

expected

cert-name CT,,

The second & third trust bits can be anything. The first one needs to have trust flag. Reference for trust bits: image

Actual Behavior

Certificate is added to nssdb without proper trust attributes. On running the following command:

certutil -d sql:$HOME/.pki/nssdb -L

Output:

cert-name ,,

Testcase Gist URL

https://gist.github.com/tn185075/cf34e2157a69721fb29f9cf7418ee14a

Additional Information

Note that the certificate we used is in .p12 format, and is a self signed one.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 24 (8 by maintainers)

Most upvoted comments

@deepak1556 would appreciate if you can try and find solution before I can make it up in a fiddle, as I need to create different cert set again.