Пример #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;
        }
Пример #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);
 }
Пример #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;
 }
Пример #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;
        }
Пример #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;
        }
Пример #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)
 {
 }
Пример #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)
 {
 }