[openssl/openssl] 635ffe: Fix use of BCryptGenRandom

"'Milan Broz' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 635ffe8bb9c0d14ce33c5368d90d5e87781480c3
      https://github.com/openssl/openssl/commit/635ffe8bb9c0d14ce33c5368d90d5e87781480c3
  Author: Milan Broz <[email protected]>
  Date:   2026-07-01 (Wed, 01 Jul 2026)

  Changed paths:
    M providers/implementations/rands/seeding/rand_win.c
    M util/platform_symbols/windows-symbols.txt

  Log Message:
  -----------
  Fix use of BCryptGenRandom

Current path for Windows RNG (for Vista and above) should
use BCryptGenRandom() function but the symbol is not included
in platform_symbols.

The issue was hidden before commit 1eaf29ef6c reordered
Windows header inclusion.

Moreover, a cast to ULONG is required for strict warnings build.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Saša Nedvědický <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Wed Jul  1 09:14:17 2026
(Merged from https://github.com/openssl/openssl/pull/31774)


  Commit: 8a57600f2348a2a097127110c6db4730091e7c17
      https://github.com/openssl/openssl/commit/8a57600f2348a2a097127110c6db4730091e7c17
  Author: Milan Broz <[email protected]>
  Date:   2026-07-01 (Wed, 01 Jul 2026)

  Changed paths:
    M include/internal/e_os.h

  Log Message:
  -----------
  Use more recent default for _WIN32_WINNT

After the windows.h include optimization introduced in
commit 1eaf29ef6c, the _WIN32_WINNT default was changed, causing
performance regressions.

Currently, _WIN32_WINNT is defined as 0x0501, which means WinXP.

This causes the code to be compiled with WinXP-compatible code, notably
 - without USE_RWLOCK
 - using legacy thread implementation
 - legacy RNG seeding (no BCryptGenRandom)

This patch increases the requirement to 0x600 (Windows Vista).

Note that code running on WinXP cannot currently be compiled with
any default configuration, as supported compilers generate executables
for Windows Vista and above.

If we provide some way to support WinXP, it can be done by
redefining _WIN32_WINNT.

Resolves: https://github.com/openssl/project/issues/2010
Fixes: 1eaf29ef6c "Remove direct includes of windows.h where possible"

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Saša Nedvědický <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Wed Jul  1 09:14:18 2026
(Merged from https://github.com/openssl/openssl/pull/31774)


Compare: https://github.com/openssl/openssl/compare/e9351bcce65c...8a57600f2348

To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/e9351b-8a5760%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.