public CertificateChangedDialog(X509Certificate certificate, string hostname)
        {
            InitializeComponent();
            AlwaysIgnoreCheckBox.Enabled = Registry.AlwaysShowSSLCertificates == SSLCertificateTypes.None;
            pictureBox1.Image = SystemIcons.Warning.ToBitmap();
            NewCertificate = certificate;
            _hostname = hostname;

            string h = _hostname.Ellipsise(35);
            X509Certificate2 cert2 = new X509Certificate2(NewCertificate);
            labelTrusted.Text = string.Format(labelTrusted.Text, h,
                                              cert2.VerifyInAllStores() ? Messages.TRUSTED : Messages.NOT_TRUSTED);
            BlurbLabel.Text = string.Format(BlurbLabel.Text, h);
            Blurb2Label.Text = string.Format(Blurb2Label.Text, h);
        }
        public UnknownCertificateDialog(X509Certificate certificate,string hostname)
        {
            InitializeComponent();
            AutoAcceptCheckBox.Enabled = Registry.AlwaysShowSSLCertificates != SSLCertificateTypes.All;
            IconPictureBox.Image = SystemIcons.Warning.ToBitmap();
            _hostname = hostname;
            Certificate = certificate;


            string h = _hostname.Ellipsise(35);

            X509Certificate2 cert2=new X509Certificate2(Certificate);

            labelTrusted.Text = string.Format(labelTrusted.Text, h,
                                              cert2.VerifyInAllStores() ? Messages.TRUSTED : Messages.NOT_TRUSTED);
            BlurbLabel.Text = string.Format(BlurbLabel.Text, h);
            Blurb2Label.Text = string.Format(Blurb2Label.Text, h);
        }