You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to the pull request #1859, which introduced the --client-certificate flag. When trying to use a PEM file in this manner it does not allow access to a site requesting the client certificate.
Reacted by Manikanta Gade, matteoli, Melvin Carvalho, fxlae, Akash, Kishor Pawar, trackmyapp, Mark, Sebastian Malton, Tomáš Kudlička and 1 more
Got around to finding the real issue with the certificate and test server sample provided by @kjlaw89 . Did a log-net-log trace on both chrome and Electron , found the following in socket connection stage after the server certificates were received.
there was no client certificate read, and AtomBrowserClient::SelectClientCertificate was never hit, turned out chromium does a initial search on the platfrom store for non-emptyness before requesting the delegate on the UI thread to let user select certificate. I patched this initial check and SelectClientCertificate got triggered with data from PEM file passed back. Now there is a second stage lookup on the platform store for private key in openssl_platfrom_key_*.cc , so the purpose of command line option is now obsolete as there is always a lookup on the platform store unless we patch it on chromium, which i dont suggest. Any suggestions to solve this problem @zcbenz
looked into this further, currently there is no way to hook into a resource lifecycle where we can provide both certificate and private key. The only hook is when chromiums' resource loader asks for a certificate and it will look into the platform certificate database for the key. As far as i can see the current implementation of client-certificate flag doesnt serve its purpose and can be removed. Instead we can provide api to import certificate and ca authorities. Users can listen to select-client-certificate and proceed. @zcbenz thoughts ?
@deepak1556 Thanks for looking into this again! What exactly are you proposing doing? I'd be okay with removing the client certificate flag if I had a way to dynamically load a client certificate. It was almost possible to do it with the select-client-certificate event, but it required that a client certificate be installed on the computer first before you could pass in a custom client certificate. If it was possible to get around that (no client certificate installed on the computer) and use my custom client certificate that'd be perfect.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This is a very valid use case for apps behind corporate networks. They use cloud proxies like zscaler, netlog to ssl inspect the traffic. It's becoming untenable to request them to exclude urls needed by our app from ssl inspection
We plan to using squid proxy with ssl-bump. Need to import root certificate into Electron App (Windows) for using this application in closed corporate network.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
Would like to see this implemented as I'm currently working on an application that will need a way for users to configure their certificates on Linux. Would be great to be able to manage certificates through CRUD methods to fully resemble Chrome's certificate store interface (in Settings > Privacy and security > Manage certificates). app.importCertificate is a start, but not being able to list certificates and remove them is rather limiting.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
Activity
kjlaw89 commentedon Jun 12, 2015
Just incase it has any use, here's the SSL error that Electron throws:
deepak1556 commentedon Jun 22, 2015
Got around to finding the real issue with the certificate and test server sample provided by @kjlaw89 . Did a
log-net-logtrace on both chrome and Electron , found the following in socket connection stage after the server certificates were received.there was no client certificate read, and
AtomBrowserClient::SelectClientCertificatewas never hit, turned out chromium does a initial search on the platfrom store for non-emptyness before requesting the delegate on the UI thread to let user select certificate. I patched this initial check andSelectClientCertificategot triggered with data from PEM file passed back. Now there is a second stage lookup on the platform store for private key inopenssl_platfrom_key_*.cc, so the purpose of command line option is now obsolete as there is always a lookup on the platform store unless we patch it on chromium, which i dont suggest. Any suggestions to solve this problem @zcbenzzcbenz commentedon Jun 23, 2015
It seems that if we don't provide a cert store SelectClientCertificate will still be called?
deepak1556 commentedon Jun 23, 2015
Yup but then we cant do the fallback. Also if
SelectClientCertificateis called there will still be a search on the key store for private key but that is being resolved in this CL https://code.google.com/p/chromium/issues/detail?id=394131 . So i guess command line option would be no go until then ?zcbenz commentedon Jun 23, 2015
I think we can just wait for Chromium to support it then, we don't need to do better than Chromium.
[-]Windows: --client-certificate flag does not work[/-][+]--client-certificate flag does not work[/+]hokein commentedon Jul 13, 2015
I can verify it on other platforms.
kjlaw89 commentedon Dec 17, 2015
@deepak1556 Did Chrome 47 include the code necessary to get this flag to work? It'd be great if it was possible to use this now!
kjlaw89 commentedon Mar 29, 2016
@deepak1556 @zcbenz Okay, now that we're on Chrome 49, any hope yet? :)
deepak1556 commentedon Apr 2, 2016
looked into this further, currently there is no way to hook into a resource lifecycle where we can provide both certificate and private key. The only hook is when chromiums' resource loader asks for a certificate and it will look into the platform certificate database for the key. As far as i can see the current implementation of
client-certificateflag doesnt serve its purpose and can be removed. Instead we can provide api to import certificate and ca authorities. Users can listen toselect-client-certificateand proceed. @zcbenz thoughts ?zcbenz commentedon Apr 7, 2016
@deepak1556 Sounds good to me.
kjlaw89 commentedon Apr 8, 2016
@deepak1556 Thanks for looking into this again! What exactly are you proposing doing? I'd be okay with removing the client certificate flag if I had a way to dynamically load a client certificate. It was almost possible to do it with the select-client-certificate event, but it required that a client certificate be installed on the computer first before you could pass in a custom client certificate. If it was possible to get around that (no client certificate installed on the computer) and use my custom client certificate that'd be perfect.
36 remaining items
github-actions commentedon Nov 4, 2022
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
Bluscream commentedon Nov 4, 2022
Stop staling this, just fix it
rahul-dutt-sharma commentedon Nov 17, 2022
This is a very valid use case for apps behind corporate networks. They use cloud proxies like zscaler, netlog to ssl inspect the traffic. It's becoming untenable to request them to exclude urls needed by our app from ssl inspection
oleg-milantiev commentedon Dec 3, 2022
Have the same problem. Please help :)
We plan to using squid proxy with ssl-bump. Need to import root certificate into Electron App (Windows) for using this application in closed corporate network.
github-actions commentedon Mar 4, 2023
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
James-Livesey commentedon Apr 2, 2023
Would like to see this implemented as I'm currently working on an application that will need a way for users to configure their certificates on Linux. Would be great to be able to manage certificates through CRUD methods to fully resemble Chrome's certificate store interface (in Settings > Privacy and security > Manage certificates).
app.importCertificateis a start, but not being able to list certificates and remove them is rather limiting.That being said, I've just had a brief look at
ses.setCertificateVerifyProc, which looks promising.Tarrowren commentedon Jun 12, 2023
I have refactored the code and it now looks simpler.
https://github.com/Tarrowren/electron-self-signed-certificate-example
Problem: I used 'undici' instead of 'net.fetch' because it doesn't support 'agent', which would cause a typescript type error, but I ignored it and now it works fine, but may also raise unexpected errors...
electron-issue-triage commentedon Sep 11, 2023
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
electron-issue-triage commentedon Oct 11, 2023
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.