Page 1 of 1

Get Resource Certificate Information

PostPosted: Fri Sep 04, 2020 4:23 pm
by mauricioconst
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.

Re: Get Resource Certificate Information

PostPosted: Fri Sep 04, 2020 5:29 pm
by magreenblatt
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.

Re: Get Resource Certificate Information

PostPosted: Fri Sep 04, 2020 5:41 pm
by mauricioconst
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.

Re: Get Resource Certificate Information

PostPosted: Sat Sep 05, 2020 4:37 am
by ndesktop
That will require patching on net/ and /net_service on CEF level.