Skip to content

Conversation

@justsmth
Copy link
Contributor

@justsmth justsmth commented Jan 13, 2026

Issues:

Addresses #1997

Description of changes:

ProcessPrng (from bcryptprimitives.dll) is only available on Windows 8+. So the current code fails at runtime on Windows 7 because GetProcAddress returns NULL and causes an abort().

This change defines AWSLC_WINDOWS_7_COMPAT when _WIN32_WINNT <= _WIN32_WINNT_WIN7. Then uses the existing BCryptGenRandom logic when it's is defined.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.22%. Comparing base (8238483) to head (c7599cd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2940   +/-   ##
=======================================
  Coverage   78.22%   78.22%           
=======================================
  Files         690      690           
  Lines      118745   118746    +1     
  Branches    16680    16681    +1     
=======================================
+ Hits        92884    92892    +8     
+ Misses      24972    24963    -9     
- Partials      889      891    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
// ProcessPrng (from `bcryptprimitives.dll`) is only available on Windows 8+.
#if !defined(__MINGW32__) && defined(_WIN32_WINNT) && _WIN32_WINNT <= _WIN32_WINNT_WIN7
#define AWSLC_WINDOWS_7_COMPAT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Should we drop the COMPAT? seems like that's already implied like the rest of our compatibility macros like OPENSSL_WINDOWS.

Suggested change
#define AWSLC_WINDOWS_7_COMPAT
#define AWSLC_WINDOWS_7

@justsmth justsmth merged commit 75a3e8b into aws:main Jan 16, 2026
513 of 518 checks passed
@justsmth justsmth deleted the support-win7 branch January 16, 2026 16:17
@justsmth justsmth mentioned this pull request Jan 21, 2026
justsmth added a commit that referenced this pull request Jan 22, 2026
### Description of changes: 
Prepare AWS-LC v1.67.0

#### What's Changed
* Migrate Wycheproof test vectors for ECDSA, RSA PKCS#1, and some more
by @sgmenda in #2887
* increase timeout for SDE tests by @sgmenda in
#2936
* Rename volatile state/memory to unique state/memory by @torben-hansen
in #2935
* Fix failing Windows Docker image build by @nhatnghiho in
#2931
* Service Indicator: Add error call trampoline to avoid delocator issue
by @jakemas in #2920
* Add support for Big Endian in ACVP tool by @samuel40791765 in
#2938
* AES-GCM: Add function pointer trampolines to avoid delocator issue by
@jakemas in #2919
* Use already defined macro for no inline by @torben-hansen in
#2942
* Remove Kyber completely by @torben-hansen in
#2941
* Windows 7 support by @justsmth in
#2940
* Import mldsa-native by @jakemas in
#2902
* Use existing session context if new is actually NULL by @torben-hansen
in #2946
* Integrate Wycheproof ML-KEM test vectors by @sgmenda in
#2891
* Avoid cross-compilation build failure by @justsmth in
#2944


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants