GetPolicies() public method

public GetPolicies ( X509Certificate2 certificate ) : IList
certificate System.Security.Cryptography.X509Certificates.X509Certificate2
return IList
        public static bool IsCertificateExtendedValidation(X509Certificate2 certificate, X509Chain chain)
        {
            var decoder         = new CertificatePolicyDecoder();
            var rootCertificate = chain.ChainElements[chain.ChainElements.Count - 1].Certificate;
            var policies        = decoder.GetPolicies(certificate);

            if (policies.Count == 0)
            {
                return(false);
            }
            var rootThumbprint = rootCertificate.GetCertHash();

            if (rootThumbprint.Length != 20)
            {
                return(false);
            }
            var findRoot = Array.Find(EVRootCAMetadata, p => p.Sha1Fingerprint.MemoryCompare(rootThumbprint));

            if (findRoot == null)
            {
                return(false);
            }
            var oids = Array.FindAll(findRoot.PolicyOids, p => !string.IsNullOrWhiteSpace(p));

            return(oids.Intersect(policies.Select(p => p.PolicyOid.Value)).Any());
        }
 public static bool IsCertificateDomainValidated(X509Certificate2 certificate)
 {
     var decoder = new CertificatePolicyDecoder();
     var policies = decoder.GetPolicies(certificate);
     if (policies.Count == 0)
     {
         return false;
     }
     return DVOids.Intersect(policies.Select(p => p.PolicyOid.Value)).Any();
 }
        public static bool IsCertificateDomainValidated(X509Certificate2 certificate)
        {
            var decoder  = new CertificatePolicyDecoder();
            var policies = decoder.GetPolicies(certificate);

            if (policies.Count == 0)
            {
                return(false);
            }
            return(DVOids.Intersect(policies.Select(p => p.PolicyOid.Value)).Any());
        }
 public static bool IsCertificateExtendedValidation(X509Certificate2 certificate, X509Chain chain)
 {
     var decoder = new CertificatePolicyDecoder();
     var rootCertificate = chain.ChainElements[chain.ChainElements.Count - 1].Certificate;
     var policies = decoder.GetPolicies(certificate);
     if (policies.Count == 0)
     {
         return false;
     }
     var rootThumbprint = rootCertificate.GetCertHash();
     if (rootThumbprint.Length != 20)
     {
         return false;
     }
     var findRoot = Array.Find(EVRootCAMetadata, p => p.Sha1Fingerprint.MemoryCompare(rootThumbprint));
     if (findRoot == null)
     {
         return false;
     }
     var oids = Array.FindAll(findRoot.PolicyOids, p => !string.IsNullOrWhiteSpace(p));
     return oids.Intersect(policies.Select(p => p.PolicyOid.Value)).Any();
 }