aboutsummaryrefslogtreecommitdiffstats
path: root/Configurations
diff options
context:
space:
mode:
authorMounir IDRASSI <[email protected]>2021-01-17 02:04:08 +0100
committerNeil Horman <[email protected]>2026-07-10 14:05:02 +0200
commit09d12ef1d740f0330ac2a04f281fb2838df0db7b (patch)
tree4efc44f05a56d6de28fd55fba2f909f346536f31 /Configurations
parentDrop missed unneded GNUC>=2 check (diff)
downloadopenssl-09d12ef1d740f0330ac2a04f281fb2838df0db7b.tar.gz
openssl-09d12ef1d740f0330ac2a04f281fb2838df0db7b.zip
Allow MinGW-w64 builds to use BCryptGenRandom
MinGW-w64 has provided bcrypt headers and import libraries since version 2.0, but OpenSSL only enabled the BCryptGenRandom seeding path for supported MSVC builds. Enable the existing direct BCryptGenRandom flow for MinGW-w64 when targeting Windows Vista or newer, and link MinGW builds with bcrypt alongside the other Windows import libraries. Use __MINGW64_VERSION_MAJOR to detect MinGW-w64 because it is defined by both the 32-bit and 64-bit MinGW-w64 toolchains. Builds targeting older Windows versions keep the CryptoAPI fallback because USE_BCRYPTGENRANDOM remains disabled when _WIN32_WINNT is below 0x0600. Fixes #13878 Reviewed-by: Milan Broz <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Neil Horman <[email protected]> MergeDate: Fri Jul 10 12:05:09 2026 (Merged from https://github.com/openssl/openssl/pull/13882)
Diffstat (limited to 'Configurations')
-rw-r--r--Configurations/10-main.conf2
1 files changed, 1 insertions, 1 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 4dd4250d1b5..390aac50110 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1591,7 +1591,7 @@ my %targets = (
cppflags => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN",
threads("-D_MT")),
lib_cppflags => "-DL_ENDIAN",
- ex_libs => add("-lws2_32 -lgdi32 -lcrypt32"),
+ ex_libs => add("-lws2_32 -lgdi32 -lcrypt32 -lbcrypt"),
thread_scheme => "winthreads",
dso_scheme => "win32",
shared_target => "mingw-shared",