4 instantiations of TlsContext
System.Net.Security (4)
System\Net\Security\TlsContext.cs (4)
140
return new
TlsContext
(bag, isWedge: false, templateHasServerOptions: false);
144
return new
TlsContext
(bag, isWedge: false, templateHasServerOptions: true);
167
return new
TlsContext
(bag, isWedge: false, templateHasServerOptions: false);
176
return new
TlsContext
(sharedOptions, isWedge: true, templateHasServerOptions: sharedOptions.IsServer);
50 references to TlsContext
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (28)
Connection\DirectTlsConnectionListener.cs (4)
29
private readonly
TlsContext
_tlsContext;
30
private readonly Func<ConnectionContext?, string?, (
TlsContext
Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? _contextResolver;
59
TlsContext
tlsContext,
60
Func<ConnectionContext?, string?, (
TlsContext
Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? contextResolver,
DirectTlsTransportFactory.cs (7)
103
TlsContext
bootstrapContext =
TlsContext
.CreateServer(new SslServerAuthenticationOptions());
107
var contextCache = new ConcurrentDictionary<X509Certificate2,
TlsContext
>();
109
Func<ConnectionContext?, string?, (
TlsContext
Context, RemoteCertificateValidationCallback? ClientCertificateValidation)> contextResolver =
121
if (!contextCache.TryGetValue(certificate, out
var
context))
136
var
candidate =
TlsContext
.CreateServer(authenticationOptions);
ServerTlsContexts.cs (7)
11
/// Owns the native <see cref="
TlsContext
"/> instances created for a single listener: the credential-less
16
/// Each <see cref="
TlsContext
"/> acquires OpenSSL server credentials, so they must be disposed when the
24
private readonly
TlsContext
_bootstrapContext;
25
private readonly ConcurrentDictionary<X509Certificate2,
TlsContext
> _perCertificateContexts;
29
TlsContext
bootstrapContext,
30
ConcurrentDictionary<X509Certificate2,
TlsContext
> perCertificateContexts)
49
foreach (
var
context in _perCertificateContexts.Values)
TlsEventPump.cs (5)
83
private
TlsContext
? _tlsContext;
84
private Func<ConnectionContext?, string?, (
TlsContext
Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? _contextResolver;
196
TlsContext
tlsContext,
197
Func<ConnectionContext?, string?, (
TlsContext
Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? contextResolver,
945
TlsContext
context;
TlsEventPumpPool.cs (2)
51
TlsContext
tlsContext,
52
Func<ConnectionContext?, string?, (
TlsContext
Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? contextResolver,
UserCallbacks\ResolveTlsContextCallback.cs (3)
17
private readonly Func<ConnectionContext?, string?, (
TlsContext
Context, RemoteCertificateValidationCallback? ClientCertificateValidation)> _contextResolver;
38
Func<ConnectionContext?, string?, (
TlsContext
Context, RemoteCertificateValidationCallback? ClientCertificateValidation)> contextResolver,
52
public
TlsContext
? ResolvedContext { get; private set; }
System.Net.Security (22)
System\Net\Security\SslStream.TlsSessionWedge.cs (2)
27
TlsContext
ctx =
TlsContext
.WrapShared(_sslAuthenticationOptions);
System\Net\Security\TlsBufferSession.cs (2)
15
/// A newly-constructed instance has no <see cref="
TlsContext
"/>. Call
34
/// <exception cref="InvalidOperationException">A <see cref="
TlsContext
"/> has not been assigned via <see cref="TlsSession.SetContext"/>.</exception>
System\Net\Security\TlsContext.cs (8)
22
/// Ownership: the <see cref="
TlsContext
"/> retains any
31
/// Lifetime: callers must keep the <see cref="
TlsContext
"/> alive for as long
70
internal SslAuthenticationOptions Options => _options ?? throw new ObjectDisposedException(nameof(
TlsContext
));
124
/// <returns>A new server-side <see cref="
TlsContext
"/>.</returns>
126
public static
TlsContext
CreateServer(SslServerAuthenticationOptions options)
151
/// <returns>A new client-side <see cref="
TlsContext
"/>.</returns>
162
public static
TlsContext
CreateClient(SslClientAuthenticationOptions options)
173
internal static
TlsContext
WrapShared(SslAuthenticationOptions sharedOptions)
System\Net\Security\TlsOperationStatus.cs (1)
60
/// has no resolved <see cref="
TlsContext
"/>.
System\Net\Security\TlsSession.cs (8)
56
private
TlsContext
? _context;
176
private void InitializeFromContext(
TlsContext
context)
528
/// switch AND options were supplied at <see cref="
TlsContext
"/> creation time.
601
/// Assigns a <see cref="
TlsContext
"/> to this session. Must be called at least
607
/// <param name="context">A fully-configured <see cref="
TlsContext
"/>.</param>
619
public void SetContext(
TlsContext
context)
692
/// <see cref="
TlsContext
"/> was created without one.
1679
internal
TlsContext
Context => _context!;
System\Net\Security\TlsSocketSession.cs (1)
20
/// server <see cref="
TlsContext
"/> before invoking any operation.