コード例 #1
0
        private ISet LoadCrlEntries()
        {
            ISet        entrySet = new HashSet();
            IEnumerable certs    = c.GetRevokedCertificateEnumeration();

            X509Name previousCertificateIssuer = IssuerDN;

            foreach (CrlEntry entry in certs)
            {
                X509CrlEntry crlEntry = new X509CrlEntry(entry, isIndirect, previousCertificateIssuer);
                entrySet.Add(crlEntry);
                previousCertificateIssuer = crlEntry.GetCertificateIssuer();
            }

            return(entrySet);
        }
コード例 #2
0
        public virtual X509CrlEntry GetRevokedCertificate(
            BigInteger serialNumber)
        {
            IEnumerable certs = c.GetRevokedCertificateEnumeration();

            X509Name previousCertificateIssuer = IssuerDN;

            foreach (CrlEntry entry in certs)
            {
                X509CrlEntry crlEntry = new X509CrlEntry(entry, isIndirect, previousCertificateIssuer);

                if (serialNumber.Equals(entry.UserCertificate.Value))
                {
                    return(crlEntry);
                }

                previousCertificateIssuer = crlEntry.GetCertificateIssuer();
            }

            return(null);
        }