diff --git a/CMakeLists.txt b/CMakeLists.txt
index d275e70e655846107704d8552fba31f6c95290da..738cf9189f3a1ffd100296736e645648703e3891 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ project (Cryptlib C)
 
 include("ExternalProject")
 
-find_program(PATCH_PATH NAMES patch REQUIRED)
+find_program(PATCH_PATH NAMES patch HINTS "C:/Program Files/Git/usr/bin" "C:/Program Files (x86)/Git/usr/bin" REQUIRED)
 find_program(ENV_PATH NAMES env REQUIRED)
 find_program(SH_PATH NAMES sh REQUIRED)
 
diff --git a/patches/cl-msvc-sucks-datetime.patch b/patches/cl-msvc-sucks-datetime.patch
index 0470e50db41987867f1927c3b3acdb011f46ffce..e2f2826f91b3faa73e79c0fc7dc59c582373948e 100644
--- a/patches/cl-msvc-sucks-datetime.patch
+++ b/patches/cl-msvc-sucks-datetime.patch
@@ -1,12 +1,12 @@
 --- misc/consts.h.orig	2022-02-25 03:29:19.561319000 -0500
 +++ misc/consts.h	2022-02-25 03:31:30.766485000 -0500
 @@ -346,8 +346,7 @@
- #define MAX_TIME_VALUE			( YEARS_TO_SECONDS( 2036 - 1970 ) )
- 
- #if ( defined( __clang__ ) && ( __clang_major__ > 5 ) ) || \
--	( defined( __GNUC__ ) && ( __GNUC__ > 6 ) ) || \
--	( defined( _MSC_VER ) && VC_GE_2017( _MSC_VER ) )
-+	( defined( __GNUC__ ) && ( __GNUC__ > 6 ) )
-   #define CURRENT_TIME_VALUE	( ( DATE_YEAR + DATE_MONTH + DATE_DAY - 30 ) * 86400 )
- #else
-   #define CURRENT_TIME_VALUE	( YEARS_TO_SECONDS( 2019 - 1970 ) )
+ #define MAX_TIME_VALUE			( YEARS_TO_SECONDS( 2036 - 1970 ) )
+ 
+ #if ( defined( __clang__ ) && ( __clang_major__ > 5 ) ) || \
+-	( defined( __GNUC__ ) && ( __GNUC__ > 6 ) ) || \
+-	( defined( _MSC_VER ) && VC_GE_2017( _MSC_VER ) )
++	( defined( __GNUC__ ) && ( __GNUC__ > 6 ) )
+   #define CURRENT_TIME_VALUE	( ( DATE_YEAR + DATE_MONTH + DATE_DAY - 30 ) * 86400 )
+ #else
+   #define CURRENT_TIME_VALUE	( YEARS_TO_SECONDS( 2019 - 1970 ) )
diff --git a/patches/cl-windowsbuildfix.patch b/patches/cl-windowsbuildfix.patch
index d70b83112bf4da17d79052064c2439e8317542fd..ad96a34cee1b10eb45249bafdc54f592df76bd61 100644
--- a/patches/cl-windowsbuildfix.patch
+++ b/patches/cl-windowsbuildfix.patch
@@ -1,51 +1,51 @@
 --- crypt32.vcxproj.orig	2022-02-25 03:16:40.714299000 -0500
 +++ crypt32.vcxproj	2022-02-25 03:20:40.528577000 -0500
 @@ -35,27 +35,27 @@
-     <ConfigurationType>DynamicLibrary</ConfigurationType>
-     <UseDebugLibraries>true</UseDebugLibraries>
-     <CharacterSet>NotSet</CharacterSet>
--    <PlatformToolset>v140</PlatformToolset>
-+    <PlatformToolset>v143</PlatformToolset>
-   </PropertyGroup>
-   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-     <ConfigurationType>DynamicLibrary</ConfigurationType>
-     <UseDebugLibraries>true</UseDebugLibraries>
-     <CharacterSet>NotSet</CharacterSet>
--    <PlatformToolset>v140</PlatformToolset>
-+    <PlatformToolset>v143</PlatformToolset>
-   </PropertyGroup>
-   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-     <ConfigurationType>DynamicLibrary</ConfigurationType>
-     <UseDebugLibraries>false</UseDebugLibraries>
-     <WholeProgramOptimization>true</WholeProgramOptimization>
-     <CharacterSet>NotSet</CharacterSet>
--    <PlatformToolset>v140</PlatformToolset>
-+    <PlatformToolset>v143</PlatformToolset>
-   </PropertyGroup>
-   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-     <ConfigurationType>DynamicLibrary</ConfigurationType>
-     <UseDebugLibraries>false</UseDebugLibraries>
-     <WholeProgramOptimization>true</WholeProgramOptimization>
-     <CharacterSet>NotSet</CharacterSet>
--    <PlatformToolset>v140</PlatformToolset>
-+    <PlatformToolset>v143</PlatformToolset>
-   </PropertyGroup>
-   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-   <ImportGroup Label="ExtensionSettings">
+     <ConfigurationType>DynamicLibrary</ConfigurationType>
+     <UseDebugLibraries>true</UseDebugLibraries>
+     <CharacterSet>NotSet</CharacterSet>
+-    <PlatformToolset>v140</PlatformToolset>
++    <PlatformToolset>v143</PlatformToolset>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+     <ConfigurationType>DynamicLibrary</ConfigurationType>
+     <UseDebugLibraries>true</UseDebugLibraries>
+     <CharacterSet>NotSet</CharacterSet>
+-    <PlatformToolset>v140</PlatformToolset>
++    <PlatformToolset>v143</PlatformToolset>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+     <ConfigurationType>DynamicLibrary</ConfigurationType>
+     <UseDebugLibraries>false</UseDebugLibraries>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+     <CharacterSet>NotSet</CharacterSet>
+-    <PlatformToolset>v140</PlatformToolset>
++    <PlatformToolset>v143</PlatformToolset>
+   </PropertyGroup>
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+     <ConfigurationType>DynamicLibrary</ConfigurationType>
+     <UseDebugLibraries>false</UseDebugLibraries>
+     <WholeProgramOptimization>true</WholeProgramOptimization>
+     <CharacterSet>NotSet</CharacterSet>
+-    <PlatformToolset>v140</PlatformToolset>
++    <PlatformToolset>v143</PlatformToolset>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+   <ImportGroup Label="ExtensionSettings">
 @@ -392,9 +392,6 @@
-     <ClCompile Include="envelope\res_env.c" />
-     <ClCompile Include="io\dns.c" />
-     <ClCompile Include="io\dns_srv.c" />
--    <ClCompile Include="io\eap.c" />
--    <ClCompile Include="io\eap_rd.c" />
--    <ClCompile Include="io\eap_wr.c" />
-     <ClCompile Include="io\file.c" />
-     <ClCompile Include="io\http.c" />
-     <ClCompile Include="io\http_parse.c" />
+     <ClCompile Include="envelope\res_env.c" />
+     <ClCompile Include="io\dns.c" />
+     <ClCompile Include="io\dns_srv.c" />
+-    <ClCompile Include="io\eap.c" />
+-    <ClCompile Include="io\eap_rd.c" />
+-    <ClCompile Include="io\eap_wr.c" />
+     <ClCompile Include="io\file.c" />
+     <ClCompile Include="io\http.c" />
+     <ClCompile Include="io\http_parse.c" />
 @@ -607,4 +604,4 @@
-   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-   <ImportGroup Label="ExtensionTargets">
-   </ImportGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+   <ImportGroup Label="ExtensionTargets">
+   </ImportGroup>
 -</Project>
 \ No newline at end of file
 +</Project>