-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obsolete ServicePointManager 🎉 #103456
Obsolete ServicePointManager 🎉 #103456
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
_sslStream?.AuthenticateAsServer(_cert, true, (SslProtocols)ServicePointManager.SecurityProtocol, false); | ||
#pragma warning restore SYSLIB0014 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SslStream
part of this logic is currently unreachable - tracked by #19752
runtime/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpEndPointListener.cs
Lines 56 to 60 in d7ae8c6
if (secure) | |
{ | |
_secure = secure; | |
_cert = HttpListener.LoadCertificateAndKey(addr, port); | |
} |
runtime/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpListener.Certificates.cs
Lines 20 to 24 in d7ae8c6
internal static X509Certificate? LoadCertificateAndKey(IPAddress addr, int port) | |
{ | |
// TODO https://github.com/dotnet/runtime/issues/19752: Implement functionality to read SSL certificate. | |
return null; | |
} |
runtime/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpEndPointListener.cs
Lines 115 to 119 in d7ae8c6
if (_secure && _cert == null) | |
{ | |
accepted.Close(); | |
return; | |
} |
@@ -9,6 +9,8 @@ | |||
|
|||
namespace System.Net | |||
{ | |||
// NOTE: While this class is not explicitly marked as obsolete, | |||
// it effectively is by virtue of WebRequest.Create being obsolete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why haven't we explicitly marked it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it was to reduce the noise for anyone still using it without suppressing it at the project level.
They must suppress the warning at least once when creating the request, but not everywhere else they might have plumbed the types through.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Closes #71836