Example #1
0
        /// <summary>
        /// Initialize with settings
        /// </summary>
        /// <param name="settings">pipeline settings</param>
        public void Init(MultiSourceAnchorResolverSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            //
            // We will combine the individual certificate resolvers for each TrustAnchorResolver
            //
            m_inbound  = new AnchorCertificateResolvers();
            m_outbound = new AnchorCertificateResolvers();

            foreach (TrustAnchorResolverSettings anchorSettings in settings.Resolvers)
            {
                ITrustAnchorResolver resolver = anchorSettings.CreateResolver();
                if (resolver.IncomingAnchors != null)
                {
                    m_inbound.Add(resolver.IncomingAnchors);
                }
                if (resolver.OutgoingAnchors != null)
                {
                    m_outbound.Add(resolver.OutgoingAnchors);
                }
            }
        }
        /// <summary>
        /// Initialize with settings
        /// </summary>
        /// <param name="settings">pipeline settings</param>
        public void Init(MultiSourceAnchorResolverSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            //
            // We will combine the individual certificate resolvers for each TrustAnchorResolver 
            //
            m_inbound = new AnchorCertificateResolvers();
            m_outbound = new AnchorCertificateResolvers();

            foreach (TrustAnchorResolverSettings anchorSettings in settings.Resolvers)
            {
                ITrustAnchorResolver resolver = anchorSettings.CreateResolver();
                if (resolver.IncomingAnchors != null)
                {
                    m_inbound.Add(resolver.IncomingAnchors);
                }
                if (resolver.OutgoingAnchors != null)
                {
                    m_outbound.Add(resolver.OutgoingAnchors);
                }
            }
        }