fix: enable all SSL types in EntryPoint

This commit is contained in:
goat 2020-02-06 22:23:02 +09:00
parent 47bae57d75
commit 38b82a9dd8
2 changed files with 5 additions and 6 deletions

View file

@ -31,10 +31,6 @@ namespace Dalamud.Data
try {
Log.Verbose("Starting data download...");
// This is due to GitHub not supporting TLS 1.0
System.Net.ServicePointManager.SecurityProtocol =
SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
using var client = new HttpClient() {
BaseAddress = new Uri(DataBaseUrl)
};
@ -52,8 +48,6 @@ namespace Dalamud.Data
Log.Verbose("Loaded {0} ContentFinderCondition.", cfcs.Count);
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault;
IsDataReady = true;
} catch (Exception ex) {
Log.Error(ex, "Could not download data.");

View file

@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Net;
using Dalamud.Interface;
using EasyHook;
using Serilog;
@ -18,6 +19,10 @@ namespace Dalamud {
try {
Log.Information("Initializing a session..");
// This is due to GitHub not supporting TLS 1.0, so we enable all TLS versions globally
System.Net.ServicePointManager.SecurityProtocol =
SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls;
// Log any unhandled exception.
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;