From 5e7517f5df4039df8bb7c2958c1f587a326f2523 Mon Sep 17 00:00:00 2001 From: Chris Dziemborowicz Date: Sun, 10 Oct 2021 00:44:11 -0700 Subject: [PATCH 1/2] Resolve #218: System.NotSupportedException on Windows 8.1 --- Hourglass/Managers/UpdateManager.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Hourglass/Managers/UpdateManager.cs b/Hourglass/Managers/UpdateManager.cs index fba80b7..702e825 100644 --- a/Hourglass/Managers/UpdateManager.cs +++ b/Hourglass/Managers/UpdateManager.cs @@ -116,7 +116,16 @@ public Uri UpdateUri public override void Initialize() { ServicePointManager.Expect100Continue = true; - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | /* Tls13 */ (SecurityProtocolType)12288; + try + { + // Try to use TLS 1.3 if it's supported. + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | /* Tls13 */ (SecurityProtocolType)12288; + } + catch (NotSupportedException) + { + // Otherwise, fall back to using TLS 1.2. + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + } Task.Factory.StartNew(() => this.SetUpdateInfo(this.FetchUpdateInfo())); } From d196b2eca32f1252845867b54f6c110e82ad4c18 Mon Sep 17 00:00:00 2001 From: Chris Dziemborowicz Date: Sun, 10 Oct 2021 00:51:55 -0700 Subject: [PATCH 2/2] Bump version --- Hourglass.Bundle/Bundle.wxs | 2 +- Hourglass.Setup/Product.wxs | 2 +- Hourglass.Test/Properties/AssemblyInfo.cs | 4 ++-- Hourglass/Properties/App.manifest | 2 +- Hourglass/Properties/AssemblyInfo.cs | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Hourglass.Bundle/Bundle.wxs b/Hourglass.Bundle/Bundle.wxs index 68c7c84..afd6298 100644 --- a/Hourglass.Bundle/Bundle.wxs +++ b/Hourglass.Bundle/Bundle.wxs @@ -3,7 +3,7 @@ diff --git a/Hourglass.Setup/Product.wxs b/Hourglass.Setup/Product.wxs index ac97cc4..32d2809 100644 --- a/Hourglass.Setup/Product.wxs +++ b/Hourglass.Setup/Product.wxs @@ -1,7 +1,7 @@ - + diff --git a/Hourglass.Test/Properties/AssemblyInfo.cs b/Hourglass.Test/Properties/AssemblyInfo.cs index 0be014a..26bb7a9 100644 --- a/Hourglass.Test/Properties/AssemblyInfo.cs +++ b/Hourglass.Test/Properties/AssemblyInfo.cs @@ -17,5 +17,5 @@ [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("002a4be7-7323-4bf9-ab08-5fc8978d9eb0")] -[assembly: AssemblyVersion("1.13.0.0")] -[assembly: AssemblyFileVersion("1.13.0.0")] +[assembly: AssemblyVersion("1.14.0.0")] +[assembly: AssemblyFileVersion("1.14.0.0")] diff --git a/Hourglass/Properties/App.manifest b/Hourglass/Properties/App.manifest index 7bdc56a..8bbed21 100644 --- a/Hourglass/Properties/App.manifest +++ b/Hourglass/Properties/App.manifest @@ -1,6 +1,6 @@  - + diff --git a/Hourglass/Properties/AssemblyInfo.cs b/Hourglass/Properties/AssemblyInfo.cs index 95e1977..19e365d 100644 --- a/Hourglass/Properties/AssemblyInfo.cs +++ b/Hourglass/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ [assembly: AssemblyCopyright("Copyright © 2021 Chris Dziemborowicz")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("1.13.0.0")] -[assembly: AssemblyFileVersion("1.13.0.0")] +[assembly: AssemblyVersion("1.14.0.0")] +[assembly: AssemblyFileVersion("1.14.0.0")] [assembly: NeutralResourcesLanguageAttribute("en-US")] [assembly: Guid("83DBAA61-6193-4288-BBB7-BEAEC33FE321")] [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]