Example #1
0
        /// <summary>
        /// Constructs an instance specifying a certificate chain validator.
        /// </summary>
        /// <param name="validator">The <see cref="TrustChainValidator"/> to use in validating certificate chains</param>
        public TrustModel(TrustChainValidator validator)
        {
            if (validator == null)
            {
                throw new ArgumentNullException("validator");
            }

            m_certChainValidator = validator;
        }
Example #2
0
 public void Verify(string[] args)
 {
     string path = args.GetRequiredValue(0);
     X509Certificate2 cert = new X509Certificate2(path);
     X509Certificate2Collection anchors = SystemX509Store.OpenAnchor().GetAllCertificates();
     TrustChainValidator validator = new TrustChainValidator();
     
     validator.IsTrustedCertificate(cert, anchors);
 }
Example #3
0
 /// <summary>
 /// Constructs an instance specifying a certificate chain validator.
 /// </summary>
 /// <param name="validator">The <see cref="TrustChainValidator"/> to use in validating certificate chains</param>
 public TrustModel(TrustChainValidator validator)
 {
     if (validator == null)
     {
         throw new ArgumentNullException("validator");
     }
     
     m_certChainValidator = validator;
 }
Example #4
0
        /// <summary>
        /// Constructs an instance specifying a certificate chain validator.
        /// </summary>
        /// <param name="validator">The <see cref="TrustChainValidator"/> to use in validating certificate chains</param>
        /// <param name="policyResolver">The <see cref="IPolicyResolver"/> to use in resolving policies.</param>
        public TrustModel(TrustChainValidator validator, IPolicyResolver policyResolver)
        {
            if (validator == null)
            {
                throw new ArgumentNullException("validator");
            }

            m_certChainValidator = validator;


            m_trustPolicyResolver = policyResolver;
        }
Example #5
0
        /// <summary>
        /// Constructs an instance specifying a certificate chain validator.
        /// </summary>
        /// <param name="validator">The <see cref="TrustChainValidator"/> to use in validating certificate chains</param>
        /// <param name="policyResolver">The <see cref="IPolicyResolver"/> to use in resolving policies.</param>
        /// <param name="policyFilter">The <see cref="IPolicyFilter"/> to use in validating certificate against policies</param>
        public TrustModel(TrustChainValidator validator, IPolicyResolver policyResolver, IPolicyFilter policyFilter)
        {
            if (validator == null)
            {
                throw new ArgumentNullException("validator");
            }

            m_certChainValidator = validator;

            
            m_trustPolicyResolver = policyResolver;
            m_policyFilter = policyFilter;
        }
Example #6
0
 /// <summary>
 /// Constructs an instance specifying a certificate chain validator.
 /// </summary>
 /// <param name="validator">The <see cref="TrustChainValidator"/> to use in validating certificate chains</param>
 public TrustModel(TrustChainValidator validator) : this(validator, null)
 {
 }
Example #7
0
 /// <summary>
 /// Constructs an instance specifying a certificate chain validator.
 /// </summary>
 /// <param name="validator">The <see cref="TrustChainValidator"/> to use in validating certificate chains</param>
 public TrustModel(TrustChainValidator validator):this(validator, null, null)
 {
 }