Allow Cef consumers to show a custom certificate selection dialog (issue #1824)

Declined
#54 · Created  · Last updated

Declined pull request

Closed by: ·2016-10-27

Description

This changeset allows Cef consumers to implement a function that allows them to choose a certificate, potentially prompting the user to choose. To do this, we need to provide consumers access to Cef equivalents of net::X509Certificate and net::X509Certificate::OSCertHandle, which I have defined in this patch.

There is one tricky part that I am not sure about. Ideally some functions in CefX509Certificate would be static like they are in net::X509Certificate (e.g. IsSameOSCert). However, that would mean adding implementations in the CefX509Certificate class, when it seems that the convention is for a class like this to be a pure virtual interface with no function implementations.

Testing Done: Only compiled on Windows because I don't have Mac or Linux build machines. I confirmed that if I didn't implement CefRequestHandler::SelectClientCertificate, the first certificate was automatically selected. I then confirmed that if I did implement the function, I could select a certificate either synchronously on the UI thread or asynchronously after a short timeout. I also confirmed that I could cancel selecting a certificate properly. I ran the unit tests and some failed due to crashes, which I believe is tracked by issue #1828.

0 attachments

0 comments

Loading commits...