From 72584c31900cbe843c1d3610e300bd656e444758 Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Thu, 30 Mar 2023 15:17:00 +0300 Subject: [PATCH] Fix driver load on x86 systems As documentation says, we should link to cng.lib, not to bcrypt.lib (like we did on x86 and x64) or kdecdd.lib (like we did on arm64). Looks like on x64/arm64 it worked by accident, and on x86 driver doesn't load. https://learn.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptdestroykey#remarks https://community.osr.com/discussion/comment/255923/#Comment_255923 Fixes https://github.com/OpenVPN/ovpn-dco-win/issues/43 Bump version to 0.9.3 Signed-off-by: Lev Stipakov --- PropertySheet.props | 2 +- ovpn-dco-win.vcxproj | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/PropertySheet.props b/PropertySheet.props index a1bb21c..9d8be4b 100644 --- a/PropertySheet.props +++ b/PropertySheet.props @@ -4,7 +4,7 @@ 0 9 - 2 + 3 diff --git a/ovpn-dco-win.vcxproj b/ovpn-dco-win.vcxproj index f9d0ce9..3fc5a88 100644 --- a/ovpn-dco-win.vcxproj +++ b/ovpn-dco-win.vcxproj @@ -440,7 +440,7 @@ OVPN_DCO_VERSION_MAJOR=$(OVPN_DCO_VERSION_MAJOR);OVPN_DCO_VERSION_MINOR=$(OVPN_DCO_VERSION_MINOR);OVPN_DCO_VERSION_PATCH=$(OVPN_DCO_VERSION_PATCH);OVPN_DCO_VERSION_STR=$(OVPN_DCO_VERSION_MAJOR).$(OVPN_DCO_VERSION_MINOR).$(OVPN_DCO_VERSION_PATCH);NETADAPTER_VERSION_MAJOR=$(NETADAPTER_VERSION_MAJOR);NETADAPTER_VERSION_MINOR=$(NETADAPTER_VERSION_MINOR);%(PreprocessorDefinitions) - Netio.lib;Bcrypt.lib;uuid.lib%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) @@ -456,7 +456,7 @@ OVPN_DCO_VERSION_MAJOR=$(OVPN_DCO_VERSION_MAJOR);OVPN_DCO_VERSION_MINOR=$(OVPN_DCO_VERSION_MINOR);OVPN_DCO_VERSION_PATCH=$(OVPN_DCO_VERSION_PATCH);OVPN_DCO_VERSION_STR=$(OVPN_DCO_VERSION_MAJOR).$(OVPN_DCO_VERSION_MINOR).$(OVPN_DCO_VERSION_PATCH);NETADAPTER_VERSION_MAJOR=$(NETADAPTER_VERSION_MAJOR);NETADAPTER_VERSION_MINOR=$(NETADAPTER_VERSION_MINOR);%(PreprocessorDefinitions) - Netio.lib;Bcrypt.lib;uuid.lib%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) @@ -478,7 +478,7 @@ $(ProjectDir)$(Platform)\$(ConfigurationName)\ovpn-dco.DVL.XML - Netio.lib;Bcrypt.lib;uuid.lib%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) /Brepro %(AdditionalOptions) DebugFull false @@ -505,7 +505,7 @@ $(ProjectDir)$(Platform)\$(ConfigurationName)\ovpn-dco.DVL.XML - Netio.lib;Bcrypt.lib;uuid.lib%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) /Brepro %(AdditionalOptions) DebugFull false @@ -526,7 +526,7 @@ OVPN_DCO_VERSION_MAJOR=$(OVPN_DCO_VERSION_MAJOR);OVPN_DCO_VERSION_MINOR=$(OVPN_DCO_VERSION_MINOR);OVPN_DCO_VERSION_PATCH=$(OVPN_DCO_VERSION_PATCH);OVPN_DCO_VERSION_STR=$(OVPN_DCO_VERSION_MAJOR).$(OVPN_DCO_VERSION_MINOR).$(OVPN_DCO_VERSION_PATCH);NETADAPTER_VERSION_MAJOR=$(NETADAPTER_VERSION_MAJOR);NETADAPTER_VERSION_MINOR=$(NETADAPTER_VERSION_MINOR);%(PreprocessorDefinitions) - uuid.lib;Netio.lib;Ksecdd.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) @@ -550,7 +550,7 @@ OVPN_DCO_VERSION_MAJOR=$(OVPN_DCO_VERSION_MAJOR);OVPN_DCO_VERSION_MINOR=$(OVPN_DCO_VERSION_MINOR);OVPN_DCO_VERSION_PATCH=$(OVPN_DCO_VERSION_PATCH);OVPN_DCO_VERSION_STR=$(OVPN_DCO_VERSION_MAJOR).$(OVPN_DCO_VERSION_MINOR).$(OVPN_DCO_VERSION_PATCH);NETADAPTER_VERSION_MAJOR=$(NETADAPTER_VERSION_MAJOR);NETADAPTER_VERSION_MINOR=$(NETADAPTER_VERSION_MINOR);%(PreprocessorDefinitions) - uuid.lib;Netio.lib;Ksecdd.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) @@ -580,7 +580,7 @@ $(ProjectDir)$(Platform)\$(ConfigurationName)\ovpn-dco.DVL.XML - uuid.lib;Netio.lib;Ksecdd.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) /Brepro %(AdditionalOptions) DebugFull false @@ -607,7 +607,7 @@ $(ProjectDir)$(Platform)\$(ConfigurationName)\ovpn-dco.DVL.XML - uuid.lib;Netio.lib;Ksecdd.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) /Brepro %(AdditionalOptions) DebugFull false @@ -628,7 +628,7 @@ OVPN_DCO_VERSION_MAJOR=$(OVPN_DCO_VERSION_MAJOR);OVPN_DCO_VERSION_MINOR=$(OVPN_DCO_VERSION_MINOR);OVPN_DCO_VERSION_PATCH=$(OVPN_DCO_VERSION_PATCH);OVPN_DCO_VERSION_STR=$(OVPN_DCO_VERSION_MAJOR).$(OVPN_DCO_VERSION_MINOR).$(OVPN_DCO_VERSION_PATCH);NETADAPTER_VERSION_MAJOR=$(NETADAPTER_VERSION_MAJOR);NETADAPTER_VERSION_MINOR=$(NETADAPTER_VERSION_MINOR);%(PreprocessorDefinitions) - Netio.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) @@ -644,7 +644,7 @@ OVPN_DCO_VERSION_MAJOR=$(OVPN_DCO_VERSION_MAJOR);OVPN_DCO_VERSION_MINOR=$(OVPN_DCO_VERSION_MINOR);OVPN_DCO_VERSION_PATCH=$(OVPN_DCO_VERSION_PATCH);OVPN_DCO_VERSION_STR=$(OVPN_DCO_VERSION_MAJOR).$(OVPN_DCO_VERSION_MINOR).$(OVPN_DCO_VERSION_PATCH);NETADAPTER_VERSION_MAJOR=$(NETADAPTER_VERSION_MAJOR);NETADAPTER_VERSION_MINOR=$(NETADAPTER_VERSION_MINOR);%(PreprocessorDefinitions) - Netio.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) @@ -661,7 +661,7 @@ false - Netio.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) /Brepro %(AdditionalOptions) DebugFull false @@ -683,7 +683,7 @@ false - Netio.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) /Brepro %(AdditionalOptions) DebugFull false @@ -710,7 +710,7 @@ $(ProjectDir)$(Platform)\$(ConfigurationName)\ovpn-dco.DVL.XML - uuid.lib;Netio.lib;Ksecdd.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) /Brepro %(AdditionalOptions) DebugFull false @@ -737,7 +737,7 @@ $(ProjectDir)$(Platform)\$(ConfigurationName)\ovpn-dco.DVL.XML - uuid.lib;Netio.lib;Ksecdd.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) /Brepro %(AdditionalOptions) DebugFull false @@ -758,7 +758,7 @@ OVPN_DCO_VERSION_MAJOR=$(OVPN_DCO_VERSION_MAJOR);OVPN_DCO_VERSION_MINOR=$(OVPN_DCO_VERSION_MINOR);OVPN_DCO_VERSION_PATCH=$(OVPN_DCO_VERSION_PATCH);OVPN_DCO_VERSION_STR=$(OVPN_DCO_VERSION_MAJOR).$(OVPN_DCO_VERSION_MINOR).$(OVPN_DCO_VERSION_PATCH);NETADAPTER_VERSION_MAJOR=$(NETADAPTER_VERSION_MAJOR);NETADAPTER_VERSION_MINOR=$(NETADAPTER_VERSION_MINOR);%(PreprocessorDefinitions) - uuid.lib;Netio.lib;Ksecdd.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies) @@ -774,7 +774,7 @@ OVPN_DCO_VERSION_MAJOR=$(OVPN_DCO_VERSION_MAJOR);OVPN_DCO_VERSION_MINOR=$(OVPN_DCO_VERSION_MINOR);OVPN_DCO_VERSION_PATCH=$(OVPN_DCO_VERSION_PATCH);OVPN_DCO_VERSION_STR=$(OVPN_DCO_VERSION_MAJOR).$(OVPN_DCO_VERSION_MINOR).$(OVPN_DCO_VERSION_PATCH);NETADAPTER_VERSION_MAJOR=$(NETADAPTER_VERSION_MAJOR);NETADAPTER_VERSION_MINOR=$(NETADAPTER_VERSION_MINOR);%(PreprocessorDefinitions) - uuid.lib;Netio.lib;Ksecdd.lib;%(AdditionalDependencies) + uuid.lib;Netio.lib;cng.lib;%(AdditionalDependencies)