Skip to content

Commit

Permalink
Fix warning causing a build break.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Jun 21, 2024
1 parent 65211ad commit ae19217
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Foundation/NSUrlSessionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ public NSUrlSessionHandler (NSUrlSessionConfiguration configuration)
allowsCellularAccess = configuration.AllowsCellularAccess;
AllowAutoRedirect = true;

#pragma warning disable SYSLIB0014 // 'ServicePointManager' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient.' (https://aka.ms/dotnet-warnings/SYSLIB0014)
var sp = ServicePointManager.SecurityProtocol;
#pragma warning restore SYSLIB0014
if ((sp & SecurityProtocolType.Ssl3) != 0)
configuration.TLSMinimumSupportedProtocol = SslProtocol.Ssl_3_0;
else if ((sp & SecurityProtocolType.Tls) != 0)
Expand Down

0 comments on commit ae19217

Please sign in to comment.