37 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)
63var sslStream = new SslStream(connection.Stream);
HttpsConnectionMiddlewareTests.cs (3)
788var stream = new SslStream(connection.Stream); 1506return new SslStream(rawStream, false, (sender, certificate, chain, errors) => true); 1516return 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)
157var 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)
696using (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 (2)
System\Net\Mail\SmtpConnection.cs (2)
236SslStream sslStream = new SslStream(_stream!, false, ServicePointManager.ServerCertificateValidationCallback); 700_connection._stream = new SslStream(_connection._stream!, false, ServicePointManager.ServerCertificateValidationCallback);
System.Net.Requests (2)
System\Net\FtpControlStream.cs (2)
189SslStream sslStream = new SslStream(_dataStream, false, ServicePointManager.ServerCertificateValidationCallback); 397SslStream 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);
153 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)
84ServerOptionsSelectionCallback 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)
63var sslStream = new SslStream(connection.Stream);
HttpsConnectionMiddlewareTests.cs (38)
293var stream = OpenSslStream(connection.Stream); 311Assert.NotNull(connection.Features.Get<SslStream>()); 323var stream = OpenSslStream(connection.Stream); 356var stream = OpenSslStream(connection.Stream); 375Assert.NotNull(connection.Features.Get<SslStream>()); 391var stream = OpenSslStream(connection.Stream); 398var stream = OpenSslStream(connection.Stream); 426var stream = OpenSslStream(connection.Stream); 448Assert.NotNull(connection.Features.Get<SslStream>()); 460var stream = OpenSslStream(connection.Stream); 488var stream = OpenSslStream(connection.Stream); 529var stream = OpenSslStreamWithCert(connection.Stream); 570var stream = OpenSslStreamWithCert(connection.Stream); 614var stream = OpenSslStreamWithCert(connection.Stream); 657var stream = OpenSslStreamWithCert(connection.Stream); 667listenOptions.UseHttps((SslStream stream, SslClientHelloInfo clientHelloInfo, object state, CancellationToken cancellationToken) => 698var stream = OpenSslStreamWithCert(connection.Stream); 746var stream = OpenSslStreamWithCert(connection.Stream); 788var stream = new SslStream(connection.Stream); 806var streams = new List<SslStream>(); 852var stream = OpenSslStreamWithCert(connection.Stream, clientCertificate); 867foreach (var s in streams) 913var stream = OpenSslStreamWithCert(connection.Stream); 936var stream = OpenSslStream(connection.Stream); 969var stream = OpenSslStream(connection.Stream); 1002var stream = OpenSslStream(connection.Stream); 1054var stream = OpenSslStreamWithCert(connection.Stream); 1099var stream = OpenSslStreamWithCert(connection.Stream); 1152var stream = OpenSslStreamWithCert(connection.Stream); 1187var stream = OpenSslStreamWithCert(connection.Stream); 1214var stream = OpenSslStreamWithCert(connection.Stream); 1239var stream = OpenSslStreamWithCert(connection.Stream); 1264var stream = OpenSslStreamWithCert(connection.Stream); 1298var stream = OpenSslStreamWithCert(connection.Stream); 1403using var stream = OpenSslStream(connection.Stream); 1504private static SslStream OpenSslStream(Stream rawStream) 1514private static SslStream OpenSslStreamWithCert(Stream rawStream, X509Certificate2 clientCertificate = null) 1520private 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)
157var 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)
17private readonly SslStream _sslStream; 22public TlsConnectionFeature(SslStream sslStream, ConnectionContext context) 52public 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 316private Task DoOptionsBasedHandshakeAsync(ConnectionContext context, SslStream sslStream, Core.Internal.TlsConnectionFeature feature, CancellationToken cancellationToken) 439private 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)
696using (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)
626SslStream? sslStream = stream as SslStream;
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (2)
191SslStream sslStream = (SslStream)stream;
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
149if (stream is SslStream sslStream)
System.Net.HttpListener (3)
System\Net\Managed\HttpConnection.cs (2)
69private readonly SslStream? _sslStream; 122internal SslStream? SslStream
System\Net\Managed\HttpListener.Certificates.cs (1)
14internal static SslStream CreateSslStream(Stream innerStream, bool ownsStream, RemoteCertificateValidationCallback callback)
System.Net.Mail (9)
System\Net\Mail\SmtpConnection.cs (9)
228if (!(_stream is SslStream)) 236SslStream sslStream = new SslStream(_stream!, false, ServicePointManager.ServerCertificateValidationCallback); 547if (_connection._stream is SslStream) 558if (!(_connection._stream is SslStream)) 590if (thisPtr._connection._stream is SslStream) 617if (!(thisPtr._connection._stream is SslStream)) 702IAsyncResult result = ((SslStream)_connection._stream).BeginAuthenticateAsClient( 713((SslStream)_connection._stream).EndAuthenticateAsClient(result); 728(thisPtr._connection._stream as SslStream)!.EndAuthenticateAsClient(result);
System.Net.Requests (7)
System\Net\FtpControlStream.cs (4)
34private SslStream? _sslStream; 189SslStream sslStream = new SslStream(_dataStream, false, ServicePointManager.ServerCertificateValidationCallback); 393if (!(Stream is SslStream)) 397SslStream sslStream = new SslStream(Stream, false, ServicePointManager.ServerCertificateValidationCallback);
System\Net\NetworkStreamWrapper.cs (3)
16private SslStream? _sslStream; 56Debug.Assert(value is SslStream, "Expected SslStream"); 57_sslStream = (SslStream)value;
System.Net.Security (29)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
347bool 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) => 211public void RemoteCertificateError(SslStream SslStream, string message) => 219public void RemoteCertDeclaredValid(SslStream SslStream) => 227public void RemoteCertHasNoErrors(SslStream SslStream) => 235public void RemoteCertUserDeclaredInvalid(SslStream SslStream) => 243public void SentFrame(SslStream sslStream, ReadOnlySpan<byte> frame) 255public void ReceivedFrame(SslStream sslStream, TlsFrameHelper.TlsFrameInfo frameInfo) => 259public void ReceivedFrame(SslStream sslStream, ReadOnlySpan<byte> frame) 271public void CertificateFromCertContext(SslStream sslStream) =>
System\Net\Security\NetSecurityTelemetry.cs (2)
316public static Activity? StartActivity(SslStream stream) 331public static void StopActivity(Activity? activity, Exception? exception, SslStream stream)
System\Net\Security\SslAuthenticationOptions.cs (1)
132certificateWithKey = 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);