From aa46cd2ff33bbfcf53187c5df3d6f81c221c7b1d Mon Sep 17 00:00:00 2001 From: Maxim Ivanov Date: Mon, 20 Jan 2025 12:07:02 +0000 Subject: [PATCH] Link to advapi32 on Windows `rand.c` on Windows uses old CryptoAPI functions like CryptAcquireContext , which are present in advapi32, but it wasn't linked explicitly. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0904181d3..ea286ead5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2412,7 +2412,7 @@ target_link_libraries(wolfssl PUBLIC ${WOLFSSL_LINK_LIBS}) if(WIN32) # For Windows link ws2_32 target_link_libraries(wolfssl PUBLIC - $<$:ws2_32 crypt32>) + $<$:ws2_32 crypt32 advapi32>) elseif(APPLE) if(WOLFSSL_SYS_CA_CERTS) target_link_libraries(wolfssl PUBLIC