Hi,
When visiting an HTTPS address, the website needs to provide a customer certificate. Maybe the system already exists or needs to be obtained from USBKEY. Other browsers can appear the Selection Certificate dialog box. How can CEF4 trigger this event? And how to submit the specified certificate to CEF4?
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Which event does HTTPS website need to provide customer certificate?
-
- Posts: 18
- Joined: Sun Jan 07, 2018 1:08 am
- salvadordf
- Posts: 4360
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Which event does HTTPS website need to provide customer certificate?
Hi,
Use the TChromium.OnSelectClientCertificate event to select a client certificate.
These are the code comments about that event found here :
https://github.com/chromiumembedded/cef ... ler_capi.h
For more info about that event and the callback read these pages :
https://magpcss.org/ceforum/apidocs3/pr ... ndler.html
https://magpcss.org/ceforum/apidocs3/pr ... lback.html
As far as I know, CEF3 only allows you to select local certificates. If you need to select certificates in smartcards or other external devices you will have to modify the CEF3 binaries. Read this post in the official CEF3 forum for more info :
https://www.magpcss.org/ceforum/viewtop ... 26&p=38683
Use the TChromium.OnSelectClientCertificate event to select a client certificate.
These are the code comments about that event found here :
https://github.com/chromiumembedded/cef ... ler_capi.h
Code: Select all
///
// Called on the UI thread when a client certificate is being requested for
// authentication. Return false (0) to use the default behavior and
// automatically select the first certificate available. Return true (1) and
// call cef_select_client_certificate_callback_t::Select either in this
// function or at a later time to select a certificate. Do not call Select or
// call it with NULL to continue without using any certificate. |isProxy|
// indicates whether the host is an HTTPS proxy or the origin server. |host|
// and |port| contains the hostname and port of the SSL server. |certificates|
// is the list of certificates to choose from; this list has already been
// pruned by Chromium so that it only contains certificates from issuers that
// the server trusts.
///
https://magpcss.org/ceforum/apidocs3/pr ... ndler.html
https://magpcss.org/ceforum/apidocs3/pr ... lback.html
As far as I know, CEF3 only allows you to select local certificates. If you need to select certificates in smartcards or other external devices you will have to modify the CEF3 binaries. Read this post in the official CEF3 forum for more info :
https://www.magpcss.org/ceforum/viewtop ... 26&p=38683