示例#1
0
 public X509CrlEntry(CrlEntry c, bool isIndirect, X509Name previousCertificateIssuer)
 {
     this.c          = c;
     this.isIndirect = isIndirect;
     this.previousCertificateIssuer = previousCertificateIssuer;
     certificateIssuer = loadCertificateIssuer();
 }
示例#2
0
        public virtual X509CrlEntry GetRevokedCertificate(BigInteger serialNumber)
        {
            global::System.Collections.IEnumerable revokedCertificateEnumeration = c.GetRevokedCertificateEnumeration();
            X509Name previousCertificateIssuer = IssuerDN;

            global::System.Collections.IEnumerator enumerator = revokedCertificateEnumeration.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    CrlEntry     crlEntry     = (CrlEntry)enumerator.get_Current();
                    X509CrlEntry x509CrlEntry = new X509CrlEntry(crlEntry, isIndirect, previousCertificateIssuer);
                    if (serialNumber.Equals(crlEntry.UserCertificate.Value))
                    {
                        return(x509CrlEntry);
                    }
                    previousCertificateIssuer = x509CrlEntry.GetCertificateIssuer();
                }
            }
            finally
            {
                global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            return(null);
        }
示例#3
0
        private ISet LoadCrlEntries()
        {
            ISet set = new HashSet();

            global::System.Collections.IEnumerable revokedCertificateEnumeration = c.GetRevokedCertificateEnumeration();
            X509Name previousCertificateIssuer = IssuerDN;

            global::System.Collections.IEnumerator enumerator = revokedCertificateEnumeration.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    CrlEntry     crlEntry     = (CrlEntry)enumerator.get_Current();
                    X509CrlEntry x509CrlEntry = new X509CrlEntry(crlEntry, isIndirect, previousCertificateIssuer);
                    set.Add(x509CrlEntry);
                    previousCertificateIssuer = x509CrlEntry.GetCertificateIssuer();
                }
                return(set);
            }
            finally
            {
                global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }
示例#4
0
        public virtual X509CrlEntry GetRevokedCertificate(BigInteger serialNumber)
        {
            IEnumerable revokedCertificateEnumeration = this.c.GetRevokedCertificateEnumeration();
            X509Name    issuerDN   = this.IssuerDN;
            IEnumerator enumerator = revokedCertificateEnumeration.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    CrlEntry     current = (CrlEntry)enumerator.Current;
                    X509CrlEntry entry2  = new X509CrlEntry(current, this.isIndirect, issuerDN);
                    if (serialNumber.Equals(current.UserCertificate.Value))
                    {
                        return(entry2);
                    }
                    issuerDN = entry2.GetCertificateIssuer();
                }
            }
            finally
            {
                if (enumerator is IDisposable disposable)
                {
                    IDisposable disposable;
                    disposable.Dispose();
                }
            }
            return(null);
        }
示例#5
0
        private ISet LoadCrlEntries()
        {
            ISet        set = new HashSet();
            IEnumerable revokedCertificateEnumeration = this.c.GetRevokedCertificateEnumeration();
            X509Name    issuerDN   = this.IssuerDN;
            IEnumerator enumerator = revokedCertificateEnumeration.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    CrlEntry     current = (CrlEntry)enumerator.Current;
                    X509CrlEntry o       = new X509CrlEntry(current, this.isIndirect, issuerDN);
                    set.Add(o);
                    issuerDN = o.GetCertificateIssuer();
                }
            }
            finally
            {
                if (enumerator is IDisposable disposable)
                {
                    IDisposable disposable;
                    disposable.Dispose();
                }
            }
            return(set);
        }
 public CrlEntry[] GetRevokedCertificates()
 {
     if (revokedCertificates == null)
     {
         return(new CrlEntry[0]);
     }
     CrlEntry[] array = new CrlEntry[revokedCertificates.Count];
     for (int i = 0; i < array.Length; i++)
     {
         array[i] = new CrlEntry(Asn1Sequence.GetInstance(revokedCertificates[i]));
     }
     return(array);
 }
示例#7
0
 public X509CrlEntry(CrlEntry c)
 {
     this.c            = c;
     certificateIssuer = loadCertificateIssuer();
 }
 public X509CrlEntry(
     CrlEntry c)
 {
     this.c = c;
 }