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.

Certificate in pfx file

Post Reply
chemapa
Posts: 5
Joined: Sat Sep 21, 2019 4:06 pm

Certificate in pfx file

Post by chemapa »

Hello.

I need load a certificate from a pfx file. It's possible in OnSelectClientCertificate?

Else it's possible assing "on the fly" the know data to TCefX509Certificate created to call "callback.Select(aTCefX509Certificate)"? :?

Thanks
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Certificate in pfx file

Post by salvadordf »

Hi,

I'm afraid that's not possible.

These are the code comments for that event :
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 ICefSelectClientCertificateCallback.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.
Chromiun selects a few certificates installed in the operating system that the server trust.
You can only select one of those certificates.

CEF only allows us to wrap a certificate that Chromium selected in the OnSelectClientCertificate event using TCEFX509CertificateRef.
We can't create a new certificate.
chemapa
Posts: 5
Joined: Sat Sep 21, 2019 4:06 pm

Re: Certificate in pfx file

Post by chemapa »

That's what I feared. Every parameters is const.

Thanks

:cry:
Post Reply