internal static void ProcessAttrCert4(X509Certificate acIssuerCert, PkixParameters pkixParams) { ISet trustedACIssuers = pkixParams.GetTrustedACIssuers(); bool flag = false; global::System.Collections.IEnumerator enumerator = ((global::System.Collections.IEnumerable)trustedACIssuers).GetEnumerator(); try { while (enumerator.MoveNext()) { TrustAnchor trustAnchor = (TrustAnchor)enumerator.get_Current(); IDictionary rFC2253Symbols = (IDictionary)(object)X509Name.RFC2253Symbols; if (acIssuerCert.SubjectDN.ToString(reverse: false, rFC2253Symbols).Equals(trustAnchor.CAName) || acIssuerCert.Equals(trustAnchor.TrustedCert)) { flag = true; } } } finally { global::System.IDisposable disposable = enumerator as global::System.IDisposable; if (disposable != null) { disposable.Dispose(); } } if (!flag) { throw new PkixCertPathValidatorException("Attribute certificate issuer is not directly trusted."); } }
internal static void ProcessAttrCert4(X509Certificate acIssuerCert, PkixParameters pkixParams) { ISet trustedACIssuers = pkixParams.GetTrustedACIssuers(); bool flag = false; foreach (TrustAnchor trustAnchor in trustedACIssuers) { IDictionary rFC2253Symbols = X509Name.RFC2253Symbols; if (acIssuerCert.SubjectDN.ToString(false, rFC2253Symbols).Equals(trustAnchor.CAName) || acIssuerCert.Equals(trustAnchor.TrustedCert)) { flag = true; } } if (!flag) { throw new PkixCertPathValidatorException("Attribute certificate issuer is not directly trusted."); } }
internal static void ProcessAttrCert4( X509Certificate acIssuerCert, PkixParameters pkixParams) { ISet set = pkixParams.GetTrustedACIssuers(); bool trusted = false; foreach (TrustAnchor anchor in set) { if (acIssuerCert.SubjectDN.ToString(false, X509Name.RFC2253Symbols) .Equals(anchor.CAName) || acIssuerCert.Equals(anchor.TrustedCert)) { trusted = true; } } if (!trusted) { throw new PkixCertPathValidatorException( "Attribute certificate issuer is not directly trusted."); } }
internal static void ProcessAttrCert4( X509Certificate acIssuerCert, PkixParameters pkixParams) { ISet set = pkixParams.GetTrustedACIssuers(); bool trusted = false; foreach (TrustAnchor anchor in set) { IDictionary symbols = X509Name.RFC2253Symbols; if (acIssuerCert.SubjectDN.ToString(false, symbols).Equals(anchor.CAName) || acIssuerCert.Equals(anchor.TrustedCert)) { trusted = true; } } if (!trusted) { throw new PkixCertPathValidatorException( "Attribute certificate issuer is not directly trusted."); } }