Skip to content

Commit 90bdb14

Browse files
committed
Use TLS1.1 and TLS1.0, improve readability of update script
1 parent aa735a1 commit 90bdb14

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Core.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,14 @@ private void StartUpdate(object sender, EventArgs e)
307307
updateClient.DownloadFile(Settings.Default.ExecutableUrl, tempNfu);
308308
}
309309

310-
File.WriteAllText(tempCmd, string.Format("@ECHO OFF{3}TITLE {0}{3}ECHO {1}{3}TIMEOUT /T 5{3}ECHO.{3}ECHO {2}{3}COPY /B /Y \"{4}\" \"{5}\"{3}START \"\" \"{5}\"",
311-
Resources.UpdateTitle, Resources.WaitingToExit, Resources.Updating, Environment.NewLine, tempNfu, Application.ExecutablePath));
310+
File.WriteAllText(tempCmd, $"@ECHO OFF{Environment.NewLine}" +
311+
$"TITLE {Resources.UpdateTitle}{Environment.NewLine}" +
312+
$"ECHO {Resources.WaitingToExit}{Environment.NewLine}" +
313+
$"TIMEOUT /T 5{Environment.NewLine}" +
314+
$"ECHO.{Environment.NewLine}" +
315+
$"ECHO {Resources.Updating}{Environment.NewLine}" +
316+
$"COPY /B /Y \"{tempNfu}\" \"{Application.ExecutablePath}\"{Environment.NewLine}" +
317+
$"START \"\" \"{Application.ExecutablePath}\"");
312318

313319
var startInfo = new ProcessStartInfo
314320
{

Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ static void Main(string[] args)
4040
Application.EnableVisualStyles();
4141
Application.SetCompatibleTextRenderingDefault(false);
4242

43-
// Use TLS 1.2
44-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
43+
// Use TLS 1.2, TLS 1.1 and TLS 1.0
44+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
4545

4646
// Automatically save settings on change
4747
Settings.Default.PropertyChanged += (sender, e) =>

0 commit comments

Comments
 (0)