From cacfb9393fb28c9773622416be6cb30f3c568b5f Mon Sep 17 00:00:00 2001 From: Artem Los Date: Tue, 9 Jun 2020 10:54:57 +0200 Subject: [PATCH 1/3] Update Helpers.cs --- Cryptolens.Licensing/SKMv3/Helpers.cs | 41 ++++++++++++++++++--------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/Cryptolens.Licensing/SKMv3/Helpers.cs b/Cryptolens.Licensing/SKMv3/Helpers.cs index 0dc7244..96a6935 100644 --- a/Cryptolens.Licensing/SKMv3/Helpers.cs +++ b/Cryptolens.Licensing/SKMv3/Helpers.cs @@ -184,21 +184,37 @@ public enum OSType { public static OSType GetPlatform() { #if (NETSTANDARD2_0 || NET46 || NET47 || NET471) && SYSTEM_MANAGEMENT - if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux)) - { - return OSType.Linux; - } - else if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX)) - { - return OSType.Mac; - } - else if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows)) + + try { - return OSType.Windows; + if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux)) + { + return OSType.Linux; + } + else if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX)) + { + return OSType.Mac; + } + else if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows)) + { + return OSType.Windows; + } + else + { + return OSType.Undefined; + } } - else + catch(Exception ex) { - return OSType.Undefined; + int p = (int)Environment.OSVersion.Platform; + if ((p == 4) || (p == 6) || (p == 128)) + { + return OSType.Unix; + } + else + { + return OSType.Windows; + } } #else @@ -361,7 +377,6 @@ public static string GetMachineCodePI(int v=1) public static string GetMachineCode(bool platformIndependent = false, int v = 1/*bool includeProcessId = false*/) { - int p = (int)Environment.OSVersion.Platform; OSType os = GetPlatform(); #if !SYSTEM_MANAGEMENT From a44668b80930263877a0bf898169048bc53ed8a7 Mon Sep 17 00:00:00 2001 From: Artem Los Date: Tue, 9 Jun 2020 11:23:29 +0200 Subject: [PATCH 2/3] Update Cryptolens.Licensing.csproj --- Cryptolens.Licensing/Cryptolens.Licensing.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cryptolens.Licensing/Cryptolens.Licensing.csproj b/Cryptolens.Licensing/Cryptolens.Licensing.csproj index a5e2ba1..ac38d54 100644 --- a/Cryptolens.Licensing/Cryptolens.Licensing.csproj +++ b/Cryptolens.Licensing/Cryptolens.Licensing.csproj @@ -6,9 +6,9 @@ true Cryptolens AB Cryptolens AB - 4.0.25 - 4.0.25.1 - 4.0.25.1 + 4.0.26 + 4.0.26.1 + 4.0.26.1 An API documentation can be found at https://help.cryptolens.io/api/dotnet/. This is a client API that serves as an interface to Cryptolens Web API (app.cryptolens.io/docs/api/). @@ -23,7 +23,7 @@ NB: There is also one for C++ (https://github.com/Cryptolens/cryptolens-cpp)false certifikat.pfx licensing system, SKGL, serial key management, http://app.cryptolens.io/ , skgl extension, SKM Client API, cryptolens - Release notes available at https://help.cryptolens.io/api/dotnet/articles/v4025.html + Release notes available at https://help.cryptolens.io/api/dotnet/articles/v4026.html SYSTEM_MANAGEMENT From ccc5892894b7f01b10e52969dc31640cfb2f9c83 Mon Sep 17 00:00:00 2001 From: Artem Los Date: Thu, 11 Jun 2020 14:37:15 +0200 Subject: [PATCH 3/3] Update Cryptolens.Licensing.csproj --- Cryptolens.Licensing/Cryptolens.Licensing.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cryptolens.Licensing/Cryptolens.Licensing.csproj b/Cryptolens.Licensing/Cryptolens.Licensing.csproj index ac38d54..196f457 100644 --- a/Cryptolens.Licensing/Cryptolens.Licensing.csproj +++ b/Cryptolens.Licensing/Cryptolens.Licensing.csproj @@ -6,7 +6,7 @@ true Cryptolens AB Cryptolens AB - 4.0.26 + 4.0.26-beta 4.0.26.1 4.0.26.1 An API documentation can be found at https://help.cryptolens.io/api/dotnet/.