We are trying to display HTML content, which requires an X509 Certificate, within a WPF Application that uses the System.Windows.Controls.WebBrowser.
Here is a simple example of the XAML.
<WebBrowser Source="https://server.com/Welcome.html" />
In the situation where there are two or more X509 certificates with KeyUsages == X509KeyUsageFlags.DigitalSignature the Browser Control prompts the user to select which certificate should be used. We would like to prevent this dialog from being displayed.
Through code we can tell which certificate should be used but we do not see way to send this information to the browser control. At first we were expecting that the WebBrowser would have a ClientCertificate or ClientCertificates property, like HttpWebRequest does, that we could use to set the Certificate but there does not seem to be any such property.
We realize that the WebBrowser control is really a Win32 control with a WPF wrapper so maybe there is an older Win32 API call that can be used to set the Certificate?
Other suggestions were to use a 3rd party library with a different web browser control. Before we try that approach we wanted to make sure there was no way to use the c# web browser control.