Page 1 of 1

Expose Current Certificate X509

PostPosted: Fri Oct 22, 2021 3:11 am
by bbdayAk
Is possible get current X509Certificate while loading (OnBeforeResourceLoad) request?
My scope is detect when somebody use reverse proxy https decription (like fiddler) with X509 self signed cert, then i need to detect what is current cert.
Something like:

Code: Select all
protected override CefReturnValue OnBeforeResourceLoad(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback)
{
      var currentCert = request.SslStatus
      currentCert.X509Certificate

Re: Expose Current Certificate X509

PostPosted: Fri Oct 22, 2021 10:56 am
by magreenblatt
Loading with a self-signed certificate will likely fail, resulting in a call to OnCertificateError. If the load succeeds without error then you can retrieve the certificate via CefBrowser::GetNavigationEntries and CefNavigationEntry::GetSSLStatus