public virtual IList <CertificateAndContext> GetCertificateBySubjectName(X509Name subjectName) { IList <CertificateAndContext> list = new AList <CertificateAndContext>(); try { string url = GetAccessLocation(certificate, X509ObjectIdentifiers.IdADCAIssuers); if (url != null) { X509CertificateParser parser = new X509CertificateParser(); X509Certificate cert = parser.ReadCertificate(httpDataLoader.Get(url)); if (cert.SubjectDN.Equals(subjectName)) { list.Add(new CertificateAndContext()); } } } catch (CannotFetchDataException) { return(new List <CertificateAndContext>()); } catch (CertificateException) { return(new List <CertificateAndContext>()); } return(list); }