Beispiel #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (optCacerts.Checked)
            {
                SslHelper.UseTrustStoreCacerts();
            }
            else if (optSslEmptyStore.Checked)
            {
                SslHelper.UseTrustStoreEmpty();
            }
            else if (optOther.Checked)
            {
                SslHelper.SaveTrustStore(ucKeyStoreView1.KeyStorePath, ucKeyStoreView1.Pwd);
            }

            this.Close();
        }
Beispiel #2
0
        public void SetTrustStore(string trustStore, string pwd = null)
        {
            gridCertificates.Rows.Clear();

            if (trustStore == SslHelper.GLOBAL)
            {
                var certificatesValidateds = SslHelper.ValidateCacerts();
                KeyStorePath = null;
                txtPwd.Text  = "";
                Populate(certificatesValidateds);
            }
            else if (trustStore == SslHelper.NONE)
            {
                KeyStorePath = null;
                txtPwd.Text  = "";
            }
            else
            {
                KeyStorePath = trustStore;
                txtPwd.Text  = pwd;
            }
        }