Skip to content

Commit 18c172b

Browse files
committed
Use SslStream constructor compatible with .NET Standard 2.0
1 parent c846e70 commit 18c172b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

StandardSocketsHttpHandler/Net/Http/SocketsHttpHandler/ConnectHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public static ValueTask<SslStream> EstablishSslConnectionAsync(SslClientAuthenti
159159

160160
private static async ValueTask<SslStream> EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
161161
{
162-
SslStream sslStream = new SslStream(stream);
162+
SslStream sslStream = new SslStream(stream, false, sslOptions.RemoteCertificateValidationCallback, sslOptions.LocalCertificateSelectionCallback, sslOptions.EncryptionPolicy);
163163

164164
// TODO #25206 and #24430: Register/IsCancellationRequested should be removable once SslStream auth and sockets respect cancellation.
165165
CancellationTokenRegistration ctr = cancellationToken.Register(s => ((Stream)s).Dispose(), stream);

0 commit comments

Comments
 (0)