Skip to content

Commit

Permalink
Link to advapi32 on Windows
Browse files Browse the repository at this point in the history
`rand.c` on Windows uses old CryptoAPI functions like  CryptAcquireContext , which are present in advapi32, but it wasn't linked explicitly.
  • Loading branch information
redbaron authored Jan 20, 2025
1 parent e76186f commit aa46cd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2412,7 +2412,7 @@ target_link_libraries(wolfssl PUBLIC ${WOLFSSL_LINK_LIBS})
if(WIN32)
# For Windows link ws2_32
target_link_libraries(wolfssl PUBLIC
$<$<PLATFORM_ID:Windows>:ws2_32 crypt32>)
$<$<PLATFORM_ID:Windows>:ws2_32 crypt32 advapi32>)
elseif(APPLE)
if(WOLFSSL_SYS_CA_CERTS)
target_link_libraries(wolfssl PUBLIC
Expand Down

0 comments on commit aa46cd2

Please sign in to comment.