12 implementations of ITlsConnectionFeature
Kestrel.SampleApp (1)
ClientCertBufferingFeature.cs (1)
40internal class ClientCertBufferingFeature : ITlsConnectionFeature
Microsoft.AspNetCore.Http (1)
Features\TlsConnectionFeature.cs (1)
11public class TlsConnectionFeature : ITlsConnectionFeature
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateFactoryTests.cs (1)
3792private class TlsConnectionFeature : ITlsConnectionFeature
RequestDelegateGenerator\SharedTypes.cs (1)
540public class TlsConnectionFeature : ITlsConnectionFeature
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
540public class TlsConnectionFeature : ITlsConnectionFeature
Microsoft.AspNetCore.HttpOverrides (1)
CertificateForwardingFeature.cs (1)
11internal sealed class CertificateForwardingFeature : ITlsConnectionFeature
Microsoft.AspNetCore.Owin (1)
OwinFeatureCollection.cs (1)
29ITlsConnectionFeature,
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\RequestContext.FeatureCollection.cs (1)
25ITlsConnectionFeature,
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.FeatureCollection.cs (1)
32ITlsConnectionFeature,
Microsoft.AspNetCore.Server.IISIntegration (1)
ForwardedTlsConnectionFeature.cs (1)
11internal sealed class ForwardedTlsConnectionFeature : ITlsConnectionFeature
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\TlsConnectionFeature.cs (1)
14internal sealed class TlsConnectionFeature : ITlsConnectionFeature, ITlsApplicationProtocolFeature, ITlsHandshakeFeature, ISslStreamFeature
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionContext.FeatureCollection.cs (1)
10internal sealed partial class QuicConnectionContext : IProtocolErrorCodeFeature, ITlsConnectionFeature
84 references to ITlsConnectionFeature
InMemory.FunctionalTests (26)
HttpsConnectionMiddlewareTests.cs (26)
232var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 260var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 512var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 548var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 592var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 633var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 676var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 724var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 766var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 893var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 1029var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 1076var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 1282var tlsFeature = context.Features.Get<ITlsConnectionFeature>();
Kestrel.SampleApp (5)
ClientCertBufferingFeature.cs (5)
24var tlsFeature = context.Features.Get<ITlsConnectionFeature>(); 32context.Features.Set<ITlsConnectionFeature>(new ClientCertBufferingFeature(tlsFeature, context)); 42private readonly ITlsConnectionFeature _tlsFeature; 45public ClientCertBufferingFeature(ITlsConnectionFeature tlsFeature, HttpContext context)
Microsoft.AspNetCore.Http (3)
Internal\DefaultConnectionInfo.cs (3)
15private static readonly Func<IFeatureCollection, ITlsConnectionFeature> _newTlsConnectionFeature = f => new TlsConnectionFeature(); 43private ITlsConnectionFeature TlsConnectionFeature => 99public ITlsConnectionFeature? TlsConnection;
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (1)
500httpContext.Features.Set<ITlsConnectionFeature>(new TlsConnectionFeature(clientCertificate));
Microsoft.AspNetCore.HttpOverrides (1)
CertificateForwardingMiddleware.cs (1)
52httpContext.Features.Set<ITlsConnectionFeature>(new CertificateForwardingFeature(_logger, header, _options));
Microsoft.AspNetCore.Owin (6)
OwinEnvironment.cs (2)
121_entries.Add(OwinConstants.CommonKeys.ClientCertificate, new FeatureMap<ITlsConnectionFeature>(feature => feature.ClientCertificate, 123_entries.Add(OwinConstants.CommonKeys.LoadClientCertAsync, new FeatureMap<ITlsConnectionFeature>(
OwinFeatureCollection.cs (4)
256X509Certificate2 ITlsConnectionFeature.ClientCertificate 262async Task<X509Certificate2> ITlsConnectionFeature.GetClientCertificateAsync(CancellationToken cancellationToken) 349if (key == typeof(ITlsConnectionFeature)) 412yield return new KeyValuePair<Type, object>(typeof(ITlsConnectionFeature), this);
Microsoft.AspNetCore.Server.HttpSys (6)
RequestProcessing\RequestContext.FeatureCollection.cs (5)
326X509Certificate2? ITlsConnectionFeature.ClientCertificate 350Task<X509Certificate2?> ITlsConnectionFeature.GetClientCertificateAsync(CancellationToken cancellationToken) 357var tlsFeature = (ITlsConnectionFeature)this; 375internal ITlsConnectionFeature? GetTlsConnectionFeature()
StandardFeatureCollection.cs (1)
21{ typeof(ITlsConnectionFeature), ctx => ctx.GetTlsConnectionFeature() },
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (4)
HttpsTests.cs (4)
81var tls = httpContext.Features.Get<ITlsConnectionFeature>(); 106var tls = httpContext.Features.Get<ITlsConnectionFeature>();
Microsoft.AspNetCore.Server.IIS (4)
Core\IISHttpContext.FeatureCollection.cs (3)
377Task<X509Certificate2?> ITlsConnectionFeature.GetClientCertificateAsync(CancellationToken cancellationToken) 379return Task.FromResult(((ITlsConnectionFeature)this).ClientCertificate); 382unsafe X509Certificate2? ITlsConnectionFeature.ClientCertificate
Core\IISHttpContext.Features.cs (1)
22private static readonly Type ITlsConnectionFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.ITlsConnectionFeature);
Microsoft.AspNetCore.Server.IISIntegration (1)
IISMiddleware.cs (1)
140httpContext.Features.Set<ITlsConnectionFeature>(new ForwardedTlsConnectionFeature(_logger, header));
Microsoft.AspNetCore.Server.Kestrel.Core (14)
Internal\Http\HttpProtocol.cs (1)
404var tlsFeature = ConnectionFeatures?[typeof(ITlsConnectionFeature)];
Internal\Http\HttpProtocol.Generated.cs (9)
70internal protected ITlsConnectionFeature? _currentITlsConnectionFeature; 268else if (key == typeof(ITlsConnectionFeature)) 420else if (key == typeof(ITlsConnectionFeature)) 422_currentITlsConnectionFeature = (ITlsConnectionFeature?)value; 574else if (typeof(TFeature) == typeof(ITlsConnectionFeature)) 576feature = Unsafe.As<ITlsConnectionFeature?, TFeature?>(ref _currentITlsConnectionFeature); 734else if (typeof(TFeature) == typeof(ITlsConnectionFeature)) 736_currentITlsConnectionFeature = Unsafe.As<TFeature?, ITlsConnectionFeature?>(ref feature); 884yield return new KeyValuePair<Type, object>(typeof(ITlsConnectionFeature), _currentITlsConnectionFeature);
Internal\HttpConnection.cs (1)
215var hasTls = _context.ConnectionFeatures.Get<ITlsConnectionFeature>() != null;
Middleware\HttpsConnectionMiddleware.cs (2)
136if (context.Features.Get<ITlsConnectionFeature>() != null) 151context.Features.Set<ITlsConnectionFeature>(feature);
TlsHandshakeCallbackContext.cs (1)
46/// The default is false. See <see cref="ITlsConnectionFeature.GetClientCertificateAsync"/>
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
HttpProtocolFeatureCollection.cs (2)
145public ITlsConnectionFeature Get_ITlsConnectionFeature() 147return _collection.Get<ITlsConnectionFeature>();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (9)
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (9)
31internal protected ITlsConnectionFeature? _currentITlsConnectionFeature; 142else if (key == typeof(ITlsConnectionFeature)) 182else if (key == typeof(ITlsConnectionFeature)) 184_currentITlsConnectionFeature = (ITlsConnectionFeature?)value; 224else if (typeof(TFeature) == typeof(ITlsConnectionFeature)) 226feature = Unsafe.As<ITlsConnectionFeature?, TFeature?>(ref _currentITlsConnectionFeature); 267else if (typeof(TFeature) == typeof(ITlsConnectionFeature)) 269_currentITlsConnectionFeature = Unsafe.As<TFeature?, ITlsConnectionFeature?>(ref feature); 305yield return new KeyValuePair<Type, object>(typeof(ITlsConnectionFeature), _currentITlsConnectionFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
QuicConnectionListenerTests.cs (2)
141var tlsFeature = features.Get<ITlsConnectionFeature>();