Get Resource Certificate Information

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Get Resource Certificate Information

Postby mauricioconst » Fri Sep 04, 2020 4:23 pm

Hi,

Is it possible in a callback like OnResourceLoadComplete get the certificate information for the loaded resource?

I need to perform a certificate validation on all resources loaded but i can't find the right way to do it. Is there another method to do that?

Thanks.
mauricioconst
Newbie
 
Posts: 9
Joined: Tue Mar 24, 2015 4:09 pm

Re: Get Resource Certificate Information

Postby magreenblatt » Fri Sep 04, 2020 5:29 pm

There is no callback for valid certificates during resource loading. Invalid certificates will be passed to OnCertificateError. You can get the certificate after page load using browser->GetHost()->GetVisibleNavigationEntry()->GetSSLStatus(). See example usage here in cefclient.
magreenblatt
Site Admin
 
Posts: 10548
Joined: Fri May 29, 2009 6:57 pm

Re: Get Resource Certificate Information

Postby mauricioconst » Fri Sep 04, 2020 5:41 pm

Thanks for the response!

I already use GetSSLStatus but this only give me the certificate chain for the main page, not the resources loaded. I can see all the URLs of the resources that are loaded using the OnResourceLoadComplete, but the SSL information are not available there. Is there any way to get this information using OnResourceLoadComplete or anything similar? Or certificate information is not avaible to resources even after loading?

Thanks.
mauricioconst
Newbie
 
Posts: 9
Joined: Tue Mar 24, 2015 4:09 pm

Re: Get Resource Certificate Information

Postby ndesktop » Sat Sep 05, 2020 4:37 am

That will require patching on net/ and /net_service on CEF level.
ndesktop
Expert
 
Posts: 473
Joined: Thu Dec 03, 2015 10:10 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 31 guests