Expose Current Certificate X509

Think CEF could benefit from a new feature or capability? Discuss CEF feature requests here.

Expose Current Certificate X509

Postby bbdayAk » Fri Oct 22, 2021 3:11 am

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
bbdayAk
Newbie
 
Posts: 1
Joined: Fri Oct 22, 2021 3:05 am

Re: Expose Current Certificate X509

Postby magreenblatt » Fri Oct 22, 2021 10:56 am

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
magreenblatt
Site Admin
 
Posts: 12379
Joined: Fri May 29, 2009 6:57 pm


Return to Feature Request Forum

Who is online

Users browsing this forum: No registered users and 3 guests