Since DotNetBrowser 1.11 it is possible to select SSL certificate instantiated from standard X509Certificate class. For example:


using DotNetBrowser;
using DotNetBrowser.WinForms;
using System;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Windows.Forms;

namespace TestWinFormsCustomCertificate
{
    public partial class Form1 : Form
    {
        WinFormsBrowserView browserView;

        public Form1()
        {
            InitializeComponent();
        
            browserView = new WinFormsBrowserView();
            Controls.Add((Control)browserView);
            Browser browser = browserView.Browser;

            X509Certificate x509Certificate = new X509Certificate(
                Path.GetFullPath("client.pfx"), 
                "1234");
            Certificate certificate = new Certificate(x509Certificate);
            CertificatesDialogParams dialogParams = null;

            browser.DialogHandler = new SelectCertificateDialogHandler(
                this, 
                (selectCertificateParameters) =>
            {
                dialogParams = selectCertificateParameters;
                dialogParams.SelectedCertificate = certificate;
                return CloseStatus.OK;
            });
            browser.LoadURL("https://ssl-host:4443");
        }

        class SelectCertificateDialogHandler : WinFormsDefaultDialogHandler
        {
            private Func<CertificatesDialogParams, CloseStatus> certificateAction;

            public SelectCertificateDialogHandler(Control control,
                Func<CertificatesDialogParams, CloseStatus> certificateAction)
                :base(control)
            {
                this.certificateAction = certificateAction;
            }

            public override CloseStatus OnSelectCertificate(
                CertificatesDialogParams parameters)
            {
                return certificateAction(parameters);
            }
        };
    }
}