コード例 #1
0
        /// <summary>
        /// Builds the DNS Challenge validator. For now only ACME DNS is supported.
        /// </summary>
        /// <param name="config"></param>
        /// <returns></returns>
        public static IDNSChallengeValidator GetDNSChallengeValidator(IConfig config)
        {
            IDNSChallengeValidator challengeValidator = null;

            if (config.ReadStringParameter("DNSValidatorType") == null)
            {
                return(null);
            }
            if (config.ReadStringParameter("DNSValidatorType") == "acme-dns")
            {
                challengeValidator = new DNSChallengeAcmeDnsValidator(config);
            }
            if (config.ReadStringParameter("DNSValidatorType") == "win-dns")
            {
                challengeValidator = new DNSChallengeWinDnsValidator(config);
            }
            return(challengeValidator);
        }
コード例 #2
0
        /// <summary>
        /// Builds the DNS Challenge validator. For now only ACME DNS is supported.
        /// </summary>
        /// <returns>challengeValidator instance</returns>
        public static IDNSChallengeValidator GetDNSChallengeValidator()
        {
            string dnsValidatorType = Program._winCertesOptions.DNSValidatorType;

            IDNSChallengeValidator challengeValidator = null;

            if (dnsValidatorType == null || dnsValidatorType.Length < 1)
            {
                return(null);
            }
            if (dnsValidatorType == "acme-dns")
            {
                challengeValidator = new DNSChallengeAcmeDnsValidator();
            }
            if (dnsValidatorType == "win-dns")
            {
                challengeValidator = new DNSChallengeWinDnsValidator();
            }
            return(challengeValidator);
        }