Ejemplo n.º 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;
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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)
 {
 }