From 2f7a2680133c40f276acaac2c350f6746fd6adc4 Mon Sep 17 00:00:00 2001 From: Chris Kaczor Date: Thu, 2 Mar 2017 09:22:36 -0500 Subject: [PATCH] Support additional security protocols and use the real version number in the user agent --- Application/Feeds/Feed.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Application/Feeds/Feed.cs b/Application/Feeds/Feed.cs index fff032c..04c672e 100644 --- a/Application/Feeds/Feed.cs +++ b/Application/Feeds/Feed.cs @@ -9,6 +9,7 @@ using System.Net; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; +using Common.Update; namespace FeedCenter { @@ -115,6 +116,9 @@ namespace FeedCenter { try { + // Add extra security protocols + ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; + // Create the web request var oRequest = WebRequest.Create(new Uri(Source)); @@ -138,7 +142,7 @@ namespace FeedCenter webRequest.Credentials = new NetworkCredential(Username, Password, Domain); // Set a user agent string - webRequest.UserAgent = "FeedCenter 1.0 ALPHA"; + webRequest.UserAgent = "FeedCenter " + UpdateCheck.LocalVersion; } // Set the default encoding