Skip to content

Commit

Permalink
Updater fix: Force usage of TLS1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol committed Feb 22, 2018
1 parent 382ce9c commit 847b8cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osu!StreamCompanion/Code/Modules/Updater/Updater.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading;
using Newtonsoft.Json.Linq;
using osu_StreamCompanion.Code.Interfaces;
Expand All @@ -19,6 +20,7 @@ class Updater : IModule, IMainWindowUpdater
public bool Started { get; set; }
public void Start(ILogger logger)
{
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; //Force usage of TLS1.2 when possible.
Started = true;
CheckForUpdates();
}
Expand Down Expand Up @@ -131,7 +133,7 @@ private string GetStringData(string url)
{
using (var wc = new ImpatientWebClient())
{
wc.Headers.Add("user-agent", "StreamCompanion_Updater");
wc.Headers.Add("user-agent", "StreamCompanion_Updater_" + Program.ScVersion);
contents = wc.DownloadString(url);
}
}
Expand Down

0 comments on commit 847b8cd

Please sign in to comment.