35 instantiations of SslStream
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (2)
351SslStream sslStream = new SslStream(stream, false, this.ValidateRemoteCertificate); 597SslStream sslStream = new SslStream(stream, false, this.ValidateRemoteCertificate, selectionCallback);
http2cat (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
IIS.FunctionalTests (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
IIS.LongTests (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
IIS.NewShim.FunctionalTests (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
IISExpress.FunctionalTests (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
InMemory.FunctionalTests (13)
EventSourceTests.cs (1)
289await using var sslStream = new SslStream(connection.Stream);
Http2\TlsTests.cs (1)
58var sslStream = new SslStream(connection.Stream);
HttpsConnectionMiddlewareTests.cs (3)
784var stream = new SslStream(connection.Stream); 1502return new SslStream(rawStream, false, (sender, certificate, chain, errors) => true); 1512return new SslStream(rawStream, false, (sender, certificate, chain, errors) => true,
HttpsTests.cs (7)
92using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 255using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 299using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 330using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 694using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 735using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 774using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
TestTransport\InMemoryHttpClientSlim.cs (1)
124var sslStream = new SslStream(rawStream, leaveInnerStreamOpen: false, userCertificateValidationCallback:
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
161var sslStream = new SslStream(stream, leaveInnerStreamOpen: false, userCertificateValidationCallback:
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Middleware\HttpsConnectionMiddleware.cs (2)
114_sslStreamFactory = s => new SslStream(s, leaveInnerStreamOpen: false, userCertificateValidationCallback: remoteCertificateValidationCallback); 131_sslStreamFactory = s => new SslStream(s);
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
15: this(transport, readerOptions, writerOptions, s => new SslStream(s))
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (1)
682using (var sslStream = new SslStream(connection.Stream, false, (sender, cert, chain, errors) => true, null))
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (1)
62SslStream sslStream = new SslStream(stream);
System.Net.HttpListener (1)
System\Net\Managed\HttpListener.Certificates.cs (1)
16return new SslStream(innerStream, ownsStream, callback);
System.Net.Mail (1)
src\libraries\Common\src\System\Net\TlsStream.cs (1)
21_sslStream = new SslStream(stream, false, ServicePointManager.ServerCertificateValidationCallback);
System.Net.Requests (1)
src\libraries\Common\src\System\Net\TlsStream.cs (1)
21_sslStream = new SslStream(stream, false, ServicePointManager.ServerCertificateValidationCallback);
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (1)
366SslStream sslStream = new SslStream(stream, false, ValidateRemoteCertificate, selectionCallback);
137 references to SslStream
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelBindingUtility.cs (1)
34public static ChannelBinding GetToken(SslStream stream)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (2)
351SslStream sslStream = new SslStream(stream, false, this.ValidateRemoteCertificate); 597SslStream sslStream = new SslStream(stream, false, this.ValidateRemoteCertificate, selectionCallback);
http2cat (3)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
91var sslStream = sslDuplexPipe.Stream;
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
Http3SampleApp (1)
Program.cs (1)
77ServerOptionsSelectionCallback callback = (SslStream stream, SslClientHelloInfo clientHelloInfo, object state, CancellationToken cancellationToken) =>
IIS.FunctionalTests (3)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
91var sslStream = sslDuplexPipe.Stream;
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
IIS.LongTests (3)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
91var sslStream = sslDuplexPipe.Stream;
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
IIS.NewHandler.FunctionalTests (3)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
91var sslStream = sslDuplexPipe.Stream;
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
IIS.NewShim.FunctionalTests (3)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
91var sslStream = sslDuplexPipe.Stream;
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
IIS.ShadowCopy.Tests (2)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
IISExpress.FunctionalTests (3)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
91var sslStream = sslDuplexPipe.Stream;
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
InMemory.FunctionalTests (49)
EventSourceTests.cs (1)
289await using var sslStream = new SslStream(connection.Stream);
Http2\TlsTests.cs (1)
58var sslStream = new SslStream(connection.Stream);
HttpsConnectionMiddlewareTests.cs (38)
289var stream = OpenSslStream(connection.Stream); 307Assert.NotNull(connection.Features.Get<SslStream>()); 319var stream = OpenSslStream(connection.Stream); 352var stream = OpenSslStream(connection.Stream); 371Assert.NotNull(connection.Features.Get<SslStream>()); 387var stream = OpenSslStream(connection.Stream); 394var stream = OpenSslStream(connection.Stream); 422var stream = OpenSslStream(connection.Stream); 444Assert.NotNull(connection.Features.Get<SslStream>()); 456var stream = OpenSslStream(connection.Stream); 484var stream = OpenSslStream(connection.Stream); 525var stream = OpenSslStreamWithCert(connection.Stream); 566var stream = OpenSslStreamWithCert(connection.Stream); 610var stream = OpenSslStreamWithCert(connection.Stream); 653var stream = OpenSslStreamWithCert(connection.Stream); 663listenOptions.UseHttps((SslStream stream, SslClientHelloInfo clientHelloInfo, object state, CancellationToken cancellationToken) => 694var stream = OpenSslStreamWithCert(connection.Stream); 742var stream = OpenSslStreamWithCert(connection.Stream); 784var stream = new SslStream(connection.Stream); 802var streams = new List<SslStream>(); 848var stream = OpenSslStreamWithCert(connection.Stream, clientCertificate); 863foreach (var s in streams) 909var stream = OpenSslStreamWithCert(connection.Stream); 932var stream = OpenSslStream(connection.Stream); 965var stream = OpenSslStream(connection.Stream); 998var stream = OpenSslStream(connection.Stream); 1050var stream = OpenSslStreamWithCert(connection.Stream); 1095var stream = OpenSslStreamWithCert(connection.Stream); 1148var stream = OpenSslStreamWithCert(connection.Stream); 1183var stream = OpenSslStreamWithCert(connection.Stream); 1210var stream = OpenSslStreamWithCert(connection.Stream); 1235var stream = OpenSslStreamWithCert(connection.Stream); 1260var stream = OpenSslStreamWithCert(connection.Stream); 1294var stream = OpenSslStreamWithCert(connection.Stream); 1399using var stream = OpenSslStream(connection.Stream); 1500private static SslStream OpenSslStream(Stream rawStream) 1510private static SslStream OpenSslStreamWithCert(Stream rawStream, X509Certificate2 clientCertificate = null) 1516private static async Task AssertConnectionResult(SslStream stream, bool success, string body = null)
HttpsTests.cs (8)
92using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 255using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 299using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 330using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 604listenOptions.UseHttps((SslStream stream, SslClientHelloInfo clientHelloInfo, object state, CancellationToken cancellationToken) => 694using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 735using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 774using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
TestTransport\InMemoryHttpClientSlim.cs (1)
124var sslStream = new SslStream(rawStream, leaveInnerStreamOpen: false, userCertificateValidationCallback:
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
161var sslStream = new SslStream(stream, leaveInnerStreamOpen: false, userCertificateValidationCallback:
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
91var sslStream = sslDuplexPipe.Stream;
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Features\ISslStreamFeature.cs (1)
18SslStream SslStream { get; }
Internal\TlsConnectionFeature.cs (3)
16private readonly SslStream _sslStream; 21public TlsConnectionFeature(SslStream sslStream, ConnectionContext context) 51public SslStream SslStream => _sslStream;
Middleware\HttpsConnectionMiddleware.cs (5)
34private readonly Func<Stream, SslStream> _sslStreamFactory; 145var sslStream = sslDuplexPipe.Stream; 155context.Features.Set<SslStream>(sslStream); // Anti-pattern, but retain for back compat 313private Task DoOptionsBasedHandshakeAsync(ConnectionContext context, SslStream sslStream, Core.Internal.TlsConnectionFeature feature, CancellationToken cancellationToken) 436private static async ValueTask<SslServerAuthenticationOptions> ServerOptionsCallback(SslStream sslStream, SslClientHelloInfo clientHelloInfo, object? state, CancellationToken cancellationToken)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
TlsHandshakeCallbackContext.cs (1)
20public SslStream SslStream { get; internal set; } = default!;
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\ServerInfrastructure\SslDuplexPipe.cs (2)
12internal sealed class SslDuplexPipe : DuplexPipeStreamAdapter<SslStream> 19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
netstandard (1)
netstandard.cs (1)
1251[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Security.SslStream))]
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (1)
682using (var sslStream = new SslStream(connection.Stream, false, (sender, cert, chain, errors) => true, null))
System (1)
src\libraries\shims\System\ref\System.cs (1)
739[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Security.SslStream))]
System.Net.Http (7)
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (2)
58public static async ValueTask<SslStream> EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, bool async, Stream stream, CancellationToken cancellationToken) 62SslStream sslStream = new SslStream(stream);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (2)
616SslStream? sslStream = stream as SslStream;
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (2)
192SslStream sslStream = (SslStream)stream;
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
131if (stream is SslStream sslStream)
System.Net.HttpListener (3)
System\Net\Managed\HttpConnection.cs (2)
68private readonly SslStream? _sslStream; 117internal SslStream? SslStream
System\Net\Managed\HttpListener.Certificates.cs (1)
14internal static SslStream CreateSslStream(Stream innerStream, bool ownsStream, RemoteCertificateValidationCallback callback)
System.Net.Mail (1)
src\libraries\Common\src\System\Net\TlsStream.cs (1)
15private readonly SslStream _sslStream;
System.Net.Requests (1)
src\libraries\Common\src\System\Net\TlsStream.cs (1)
15private readonly SslStream _sslStream;
System.Net.Security (27)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
343bool cacheSslContext = sslAuthenticationOptions.AllowTlsResume && !SslStream.DisableTlsResume && sslAuthenticationOptions.EncryptionPolicy == EncryptionPolicy.RequireEncryption && sslAuthenticationOptions.CipherSuitesPolicy == null;
System\Net\Security\NegotiateAuthenticationClientOptions.cs (2)
29/// property. For <see cref="SslStream" /> the channel binding could be obtained 30/// through the <see cref="SslStream.TransportContext" /> property and calling the
System\Net\Security\NetEventSource.Security.cs (19)
48public void SslStreamCtor(SslStream sslStream, Stream innerStream) 113public void CertificateFromDelegate(SslStream SslStream) => 121public void NoDelegateNoClientCert(SslStream SslStream) => 129public void NoDelegateButClientCert(SslStream SslStream) => 137public void AttemptingRestartUsingCert(X509Certificate? clientCertificate, SslStream SslStream) => 145public void NoIssuersTryAllCerts(SslStream SslStream) => 153public void LookForMatchingCerts(int issuersCount, SslStream SslStream) => 161public void SelectedCert(X509Certificate clientCertificate, SslStream SslStream) => 169public void CertsAfterFiltering(int filteredCertsCount, SslStream SslStream) => 177public void FindingMatchingCerts(SslStream SslStream) => 185public void UsingCachedCredential(SslStream SslStream) => 209public void RemoteCertificateError(SslStream SslStream, string message) => 217public void RemoteCertDeclaredValid(SslStream SslStream) => 225public void RemoteCertHasNoErrors(SslStream SslStream) => 233public void RemoteCertUserDeclaredInvalid(SslStream SslStream) => 241public void SentFrame(SslStream sslStream, ReadOnlySpan<byte> frame) 253public void ReceivedFrame(SslStream sslStream, TlsFrameHelper.TlsFrameInfo frameInfo) => 257public void ReceivedFrame(SslStream sslStream, ReadOnlySpan<byte> frame) 269public void CertificateFromCertContext(SslStream sslStream) =>
System\Net\Security\SslAuthenticationOptions.cs (1)
129certificateWithKey = SslStream.FindCertificateWithPrivateKey(this, true, sslServerAuthenticationOptions.ServerCertificate);
System\Net\Security\SslStream.cs (2)
40public delegate ValueTask<SslServerAuthenticationOptions> ServerOptionsSelectionCallback(SslStream stream, SslClientHelloInfo clientHelloInfo, object? state, CancellationToken cancellationToken); 45private static readonly ExceptionDispatchInfo s_disposedSentinel = ExceptionDispatchInfo.Capture(new ObjectDisposedException(nameof(SslStream), (string?)null));
System\Net\SslStreamContext.cs (2)
12private readonly SslStream _sslStream; 14internal SslStreamContext(SslStream sslStream)
System.ServiceModel.NetFramingBase (2)
System\ServiceModel\Channels\ChannelBindingUtility.cs (1)
16public static ChannelBinding GetToken(SslStream stream)
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (1)
366SslStream sslStream = new SslStream(stream, false, ValidateRemoteCertificate, selectionCallback);