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);
        }
        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);
        }
Example #3
0
        public override bool Equals(object other)
        {
            if (this == other)
            {
                return(true);
            }

            X509CrlEntry that = other as X509CrlEntry;

            if (null == that)
            {
                return(false);
            }

            if (this.hashValueSet && that.hashValueSet)
            {
                if (this.hashValue != that.hashValue)
                {
                    return(false);
                }
            }

            return(this.c.Equals(that.c));
        }