Exemplo n.º 1
0
 public AcmeCertificateLoader(
     CertificateSelector selector,
     IHttpChallengeResponseStore challengeStore,
     IOptions <LetsEncryptOptions> options,
     ILogger <AcmeCertificateLoader> logger,
     IHostEnvironment hostEnvironment,
     IServer server,
     IConfiguration config,
     TermsOfServiceChecker tosChecker,
     IEnumerable <ICertificateRepository> certificateRepositories,
     IClock clock,
     IHostApplicationLifetime applicationLifetime,
     TlsAlpnChallengeResponder tlsAlpnChallengeResponder,
     IAccountStore?accountStore = default)
 {
     _selector                = selector;
     _challengeStore          = challengeStore;
     _accountStore            = accountStore;
     _options                 = options;
     _logger                  = logger;
     _hostEnvironment         = hostEnvironment;
     _server                  = server;
     _config                  = config;
     _tosChecker              = tosChecker;
     _certificateRepositories = certificateRepositories;
     _clock = clock;
     _applicationLifetime       = applicationLifetime;
     _tlsAlpnChallengeResponder = tlsAlpnChallengeResponder;
 }
Exemplo n.º 2
0
        public CertificateFactory(
            TermsOfServiceChecker tosChecker,
            IOptions <LetsEncryptOptions> options,
            IHttpChallengeResponseStore challengeStore,
            IAccountStore?accountRepository,
            ILogger logger,
            IHostEnvironment env,
            IHostApplicationLifetime appLifetime,
            TlsAlpnChallengeResponder tlsAlpnChallengeResponder)
        {
            _tosChecker                = tosChecker;
            _options                   = options;
            _challengeStore            = challengeStore;
            _logger                    = logger;
            _tlsAlpnChallengeResponder = tlsAlpnChallengeResponder;

            _appStarted = new TaskCompletionSource <object?>();
            appLifetime.ApplicationStarted.Register(() => _appStarted.TrySetResult(null));
            if (appLifetime.ApplicationStarted.IsCancellationRequested)
            {
                _appStarted.TrySetResult(null);
            }

            _accountRepository = accountRepository ?? new FileSystemAccountStore(logger, options, env);
            AcmeServer         = _options.Value.GetAcmeServer(env);
        }
Exemplo n.º 3
0
 public KestrelOptionsSetup(CertificateSelector certificateSelector, TlsAlpnChallengeResponder tlsAlpnChallengeResponder)
 {
     _certificateSelector       = certificateSelector ?? throw new ArgumentNullException(nameof(certificateSelector));
     _tlsAlpnChallengeResponder = tlsAlpnChallengeResponder ?? throw new ArgumentNullException(nameof(tlsAlpnChallengeResponder));
 }