Skip to content

Commit

Permalink
Allow TLS 1.2 for news download
Browse files Browse the repository at this point in the history
  • Loading branch information
mcoot committed Jan 14, 2021
1 parent 0c67fd5 commit 75891bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions News.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public NewsParsingException(string message, Exception inner) : base(message, inn

public void DownloadNews(string newsUrl)
{
// Allow TLS 1.2
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

using (var wc = new WebClient())
{
var rawData = wc.DownloadString(newsUrl);
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyVersion("1.1.2.0")]
[assembly: AssemblyFileVersion("1.1.2.0")]

0 comments on commit 75891bf

Please sign in to comment.