Esempio n. 1
0
 public AcmeCertificateLoader(
     CertificateSelector selector,
     IHttpChallengeResponseStore challengeStore,
     IOptions <LettuceEncryptOptions> options,
     ILogger <AcmeCertificateLoader> logger,
     IServer server,
     IConfiguration config,
     TermsOfServiceChecker tosChecker,
     IEnumerable <ICertificateRepository> certificateRepositories,
     IClock clock,
     IHostApplicationLifetime applicationLifetime,
     TlsAlpnChallengeResponder tlsAlpnChallengeResponder,
     ICertificateAuthorityConfiguration certificateAuthority,
     IAccountStore?accountStore = default)
 {
     _selector                = selector;
     _challengeStore          = challengeStore;
     _accountStore            = accountStore;
     _options                 = options;
     _logger                  = logger;
     _server                  = server;
     _config                  = config;
     _tosChecker              = tosChecker;
     _certificateRepositories = certificateRepositories;
     _clock = clock;
     _applicationLifetime       = applicationLifetime;
     _tlsAlpnChallengeResponder = tlsAlpnChallengeResponder;
     _certificateAuthority      = certificateAuthority;
 }
Esempio n. 2
0
        public AcmeCertificateFactory(
            AcmeClientFactory acmeClientFactory,
            TermsOfServiceChecker tosChecker,
            IOptions <LettuceEncryptOptions> options,
            IHttpChallengeResponseStore challengeStore,
            IAccountStore?accountRepository,
            ILogger logger,
            IHostApplicationLifetime appLifetime,
            TlsAlpnChallengeResponder tlsAlpnChallengeResponder,
            ICertificateAuthorityConfiguration certificateAuthority)
        {
            _acmeClientFactory         = acmeClientFactory;
            _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, certificateAuthority);
        }
 public KestrelOptionsSetup(IServerCertificateSelector certificateSelector, TlsAlpnChallengeResponder tlsAlpnChallengeResponder)
 {
     _certificateSelector       = certificateSelector ?? throw new ArgumentNullException(nameof(certificateSelector));
     _tlsAlpnChallengeResponder = tlsAlpnChallengeResponder ?? throw new ArgumentNullException(nameof(tlsAlpnChallengeResponder));
 }