Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: Unable to build Curl 7.86.0 with both Schannel and OpenSSL support.
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Peter Kitson via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 8 Nov 2022 21:43:42 +0000
It seems the problem I had compiling Curl with both OpenSSL and Schannel
backends, was down to the CMake logic failing to set USE_WIN32_CRYPTO on my
build platform.
In the Curl CMakeLists.txt file, the following section of code normally
does this:
# Check if crypto functions in wincrypt.h are actually available
if(HAVE_WINCRYPT_H)
check_symbol_exists(CryptAcquireContext "${CURL_INCLUDES}" USE_WINCRYPT)
endif()
if(USE_WINCRYPT)
set(USE_WIN32_CRYPTO ON)
endif()
CryptAcquireContext does exist in wincrypt.h, but on my platform its
definition appears to be constrained by the following pragma.
#pragma region Desktop Family or OneCore or Games Family
#if
WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_PHONE_RESTRICTED
| WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
I was using Visual Studio 2022 Community Edition in a Windows 11
development environment VM, so am guessing this doesn't fit this
WINAPI_FAMILY_PARTITION definition.
I'm not sure if this will be a concern for you, but either way, for me the
solution is to simply pass -DUSE_WIN32_CRYTO=ON to the Cmake build process.
Date: Tue, 8 Nov 2022 21:43:42 +0000
It seems the problem I had compiling Curl with both OpenSSL and Schannel
backends, was down to the CMake logic failing to set USE_WIN32_CRYPTO on my
build platform.
In the Curl CMakeLists.txt file, the following section of code normally
does this:
# Check if crypto functions in wincrypt.h are actually available
if(HAVE_WINCRYPT_H)
check_symbol_exists(CryptAcquireContext "${CURL_INCLUDES}" USE_WINCRYPT)
endif()
if(USE_WINCRYPT)
set(USE_WIN32_CRYPTO ON)
endif()
CryptAcquireContext does exist in wincrypt.h, but on my platform its
definition appears to be constrained by the following pragma.
#pragma region Desktop Family or OneCore or Games Family
#if
WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_PHONE_RESTRICTED
| WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
I was using Visual Studio 2022 Community Edition in a Windows 11
development environment VM, so am guessing this doesn't fit this
WINAPI_FAMILY_PARTITION definition.
I'm not sure if this will be a concern for you, but either way, for me the
solution is to simply pass -DUSE_WIN32_CRYTO=ON to the Cmake build process.
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2022-11-08