private void DownloadCRLs()
        {
            List <string> userSpecifiedCRLs = Utilities.GetCRLsToDownloadURLs();

            if (userSpecifiedCRLs.Any())
            {
                List <Tuple <string, string> > successfullyDownloadedCRLs2 = Utilities.DownloadFiles(userSpecifiedCRLs);
            }

            if (dataGridViewCertificates.SelectedRows.Count > 0)
            {
                var selectedRows     = dataGridViewCertificates.SelectedRows.Cast <DataGridViewRow>().ToList();
                var selectedCertRows = selectedRows.Select(row => (CertificateRow)row.DataBoundItem).ToList();
                var selectedCrlUrls  = selectedCertRows.SelectMany(certRow => certRow.GetCertificateRevocationListURLs()).Distinct().ToList();
                List <Tuple <string, string> > successfullyDownloadedSelectedCRLs = Utilities.DownloadFiles(selectedCrlUrls);
            }
            else
            {
                List <string> certStoreCRLs = certificateRowCollection.GetAllCertificatesRevocationListURLs();
                if (certStoreCRLs.Any())
                {
                    // Tuple<string, string> of the form: <RemoteFile, LocalFile>
                    List <Tuple <string, string> > successfullyDownloadedCRLs = Utilities.DownloadFiles(certStoreCRLs);
                }
            }
        }
Example #2
0
        private void DownloadCRLs()
        {
            List <string> userSpecifiedCRLs = Utilities.GetCRLsToDownloadURLs();

            if (userSpecifiedCRLs.Any())
            {
                List <Tuple <string, string> > successfullyDownloadedCRLs2 = Utilities.DownloadFiles(userSpecifiedCRLs);
            }

            List <string> certStoreCRLs = certificateRowCollection.GetAllCertificatesRevocationListURLs();

            if (certStoreCRLs.Any())
            {
                // Tuple<string, string> of the form: <RemoteFile, LocalFile>
                List <Tuple <string, string> > successfullyDownloadedCRLs = Utilities.DownloadFiles(certStoreCRLs);
            }
        }