Exemple #1
0
        private void btnGetPublicKey_Click(object sender, EventArgs e)
        {
            List <string> publicKeys = certificateRowCollection.GetAllCertificatesPublicKeys();

            string filename = Utilities.EnsureFilenameNotExists(Utilities.PublicKeysStoreOutputFilename);

            File.WriteAllLines(filename, publicKeys);
        }
Exemple #2
0
        private void btnSearchFolder_Click(object sender, EventArgs e)
        {
            using (FolderBrowserDialog dlg = new FolderBrowserDialog())
            {
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    List <X509Certificate2>  certs             = Utilities.SearchForCertsInFolder(dlg.SelectedPath);
                    CertificateRowCollection certRowCollection = CertificateRowCollection.FromList(certs);
                    List <string>            publicKeys        = certRowCollection.GetAllCertificatesPublicKeys();

                    string filename = Utilities.EnsureFilenameNotExists(Utilities.PublicKeysFolderOutputFilename);
                    File.WriteAllLines(filename, publicKeys);
                }
            }
        }