4 instantiations of HttpsConnectionMiddleware
InMemory.FunctionalTests (2)
HttpsConnectionMiddlewareTests.cs (2)
1480return new HttpsConnectionMiddleware(context => Task.CompletedTask, options, httpProtocols, loggerFactory, new KestrelMetrics(new TestMeterFactory())); 1485return new HttpsConnectionMiddleware(context => Task.CompletedTask, options, httpProtocols, new KestrelMetrics(new TestMeterFactory()));
Microsoft.AspNetCore.Server.Kestrel.Core (2)
ListenOptionsHttpsExtensions.cs (2)
202var middleware = new HttpsConnectionMiddleware(next, httpsOptions, listenOptions.Protocols, loggerFactory, metrics); 269var middleware = new HttpsConnectionMiddleware(next, callbackOptions, loggerFactory, metrics);
71 references to HttpsConnectionMiddleware
InMemory.FunctionalTests (6)
HttpsConnectionMiddlewareTests.cs (5)
1422var middleware = CreateMiddleware(httpConnectionAdapterOptions, HttpProtocols.Http1AndHttp2); 1436var middleware = CreateMiddleware(httpConnectionAdapterOptions, HttpProtocols.Http1AndHttp2); 1468private static HttpsConnectionMiddleware CreateMiddleware(X509Certificate2 serverCertificate) 1477private static HttpsConnectionMiddleware CreateMiddleware(HttpsConnectionAdapterOptions options, HttpProtocols httpProtocols, TestApplicationErrorLogger testLogger = null) 1483private static HttpsConnectionMiddleware CreateMiddleware(HttpsConnectionAdapterOptions options, HttpProtocols httpProtocols)
HttpsTests.cs (1)
792if (categoryName == TypeNameHelper.GetTypeDisplayName(typeof(HttpsConnectionMiddleware)))
Microsoft.AspNetCore.Server.Kestrel.Core (40)
HttpsConfigurationService.cs (7)
27private Action<FeatureCollection, ListenOptions, ILogger<HttpsConnectionMiddleware>>? _populateMultiplexedTransportFeatures; 30private ILogger<HttpsConnectionMiddleware>? _httpsLogger; 60ILogger<HttpsConnectionMiddleware> httpsLogger) 144internal static void PopulateMultiplexedTransportFeaturesWorker(FeatureCollection features, ListenOptions listenOptions, ILogger<HttpsConnectionMiddleware> logger) 150var sslServerAuthenticationOptions = HttpsConnectionMiddleware.CreateHttp3Options(listenOptions.HttpsOptions, logger); 245private readonly ILogger<HttpsConnectionMiddleware> _httpsLogger; 250ILogger<HttpsConnectionMiddleware> httpsLogger)
IHttpsConfigurationService.cs (1)
34ILogger<HttpsConnectionMiddleware> httpsLogger);
Internal\SniOptionsSelector.cs (7)
23private readonly ILogger<HttpsConnectionMiddleware> _logger; 38ILogger<HttpsConnectionMiddleware> logger) 80HttpsConnectionMiddleware.EnsureCertificateIsAllowedForServerAuth(cert2, logger); 90HttpsConnectionMiddleware.RemoteCertificateValidationCallback( 95httpProtocols = HttpsConnectionMiddleware.ValidateAndNormalizeHttpProtocols(httpProtocols, logger); 96HttpsConnectionMiddleware.ConfigureAlpn(sslOptions, httpProtocols); 163HttpsConnectionMiddleware.EnsureCertificateIsAllowedForServerAuth(fallbackCertificate, _logger);
KestrelServer.cs (1)
84public void Initialize(IHostEnvironment hostEnvironment, ILogger<KestrelServer> serverLogger, ILogger<HttpsConnectionMiddleware> httpsLogger)
KestrelServerOptions.cs (1)
332var httpsLogger = ApplicationServices.GetRequiredService<ILogger<HttpsConnectionMiddleware>>();
ListenOptionsHttpsExtensions.cs (2)
202var middleware = new HttpsConnectionMiddleware(next, httpsOptions, listenOptions.Protocols, loggerFactory, metrics); 269var middleware = new HttpsConnectionMiddleware(next, callbackOptions, loggerFactory, metrics);
Middleware\HttpsConnectionMiddleware.cs (19)
34private readonly ILogger<HttpsConnectionMiddleware> _logger; 73_logger = loggerFactory.CreateLogger<HttpsConnectionMiddleware>(); 134_logger = loggerFactory.CreateLogger<HttpsConnectionMiddleware>(); 454var (middleware, context, feature, metricsContext) = (ValueTuple<HttpsConnectionMiddleware, ConnectionContext, Core.Internal.TlsConnectionFeature, ConnectionMetricsContext>)state!; 481internal static void EnsureCertificateIsAllowedForServerAuth(X509Certificate2 certificate, ILogger<HttpsConnectionMiddleware> logger) 508internal static HttpProtocols ValidateAndNormalizeHttpProtocols(HttpProtocols httpProtocols, ILogger<HttpsConnectionMiddleware> logger) 547internal static SslServerAuthenticationOptions CreateHttp3Options(HttpsConnectionAdapterOptions httpsOptions, ILogger<HttpsConnectionMiddleware> logger) 597public static partial void AuthenticationFailed(this ILogger<HttpsConnectionMiddleware> logger, Exception exception); 600public static partial void AuthenticationTimedOut(this ILogger<HttpsConnectionMiddleware> logger); 603public static partial void HttpsConnectionEstablished(this ILogger<HttpsConnectionMiddleware> logger, string connectionId, SslProtocols protocol); 607public static partial void Http2DefaultCiphersInsufficient(this ILogger<HttpsConnectionMiddleware> logger); 610private static partial void LocatingCertWithPrivateKey(this ILogger<HttpsConnectionMiddleware> logger, string thumbPrint); 612public static void LocatingCertWithPrivateKey(this ILogger<HttpsConnectionMiddleware> logger, X509Certificate2 certificate) => LocatingCertWithPrivateKey(logger, certificate.Thumbprint); 615public static partial void FoundCertWithPrivateKey(this ILogger<HttpsConnectionMiddleware> logger, string thumbprint, string? storeName); 617public static void FoundCertWithPrivateKey(this ILogger<HttpsConnectionMiddleware> logger, X509Certificate2 certificate, StoreLocation storeLocation) 624public static partial void FailedToFindCertificateInStore(this ILogger<HttpsConnectionMiddleware> logger, Exception exception); 627public static partial void FailedToOpenStore(this ILogger<HttpsConnectionMiddleware> logger, string? storeName, Exception exception); 630public static partial void NoSubjectAlternativeName(this ILogger<HttpsConnectionMiddleware> logger, string thumbprint); 632public static void FailedToOpenStore(this ILogger<HttpsConnectionMiddleware> logger, StoreLocation storeLocation, Exception exception)
TlsConfigurationLoader.cs (2)
27private readonly ILogger<HttpsConnectionMiddleware> _httpsLogger; 32ILogger<HttpsConnectionMiddleware> httpsLogger)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (25)
KestrelServerOptionsTests.cs (1)
86serviceCollection.AddSingleton(Mock.Of<ILogger<HttpsConnectionMiddleware>>());
KestrelServerTests.cs (3)
303serviceProvider.GetRequiredService<ILogger<HttpsConnectionMiddleware>>()); 793serviceCollection.AddSingleton(Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 932serviceCollection.AddSingleton(Mock.Of<ILogger<HttpsConnectionMiddleware>>());
SniOptionsSelectorTests.cs (21)
70logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 127logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 173logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 222logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 285logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 330logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>())); 343logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 378logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 404logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 441logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 484logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 520logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>())); 543logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 571logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 598logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 631logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 661logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 697logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 728logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 758logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>()); 793logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>());