internal static HttpsConnectionAdapterOptions UseLettuceEncrypt(
     this HttpsConnectionAdapterOptions httpsOptions,
     IServerCertificateSelector selector,
     TlsAlpnChallengeResponder tlsAlpnChallengeResponder
     )
 {
     httpsOptions.OnAuthenticate = tlsAlpnChallengeResponder.OnSslAuthenticate;
     httpsOptions.UseServerCertificateSelector(selector);
     return(httpsOptions);
 }
コード例 #2
0
    internal static HttpsConnectionAdapterOptions UseLettuceEncrypt(
        this HttpsConnectionAdapterOptions httpsOptions,
        IServerCertificateSelector selector,
        TlsAlpnChallengeResponder tlsAlpnChallengeResponder
        )
    {
        // Check if this handler is already set. If so, chain our handler before it.
        var otherHandler = httpsOptions.OnAuthenticate;

        httpsOptions.OnAuthenticate = (ctx, options) =>
        {
            tlsAlpnChallengeResponder.OnSslAuthenticate(ctx, options);
            otherHandler?.Invoke(ctx, options);
        };

        httpsOptions.UseServerCertificateSelector(selector);
        return(httpsOptions);
    }
コード例 #3
0
 public KestrelOptionsSetup(IServerCertificateSelector certificateSelector, TlsAlpnChallengeResponder tlsAlpnChallengeResponder)
 {
     _certificateSelector       = certificateSelector ?? throw new ArgumentNullException(nameof(certificateSelector));
     _tlsAlpnChallengeResponder = tlsAlpnChallengeResponder ?? throw new ArgumentNullException(nameof(tlsAlpnChallengeResponder));
 }
コード例 #4
0
 public TlsAlpn01DomainValidator(TlsAlpnChallengeResponder tlsAlpnChallengeResponder,
                                 IHostApplicationLifetime appLifetime,
                                 AcmeClient client, ILogger logger, string domainName) : base(appLifetime, client, logger, domainName)
 {
     _tlsAlpnChallengeResponder = tlsAlpnChallengeResponder;
 }