Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Windows not supporting static array dimension #1912

Conversation

torben-hansen
Copy link
Contributor

@torben-hansen torben-hansen commented Oct 9, 2024

Issues:

CryptoAlg-2241

Description of changes:

awslabs/s2n-bignum#98 handles Windows not supporting static array dimensions. We have our own header files with function declarations for s2n-bignum. Hence that work was never ported automatically.

Adopt same detection approach as in referenced PR. MSVC doesn't support it, neither does C++. So, try to detect those cases as well as if variable-length arrays aren't supported.

Previous solution

Support it now but use our own macro OEPNSSL_WINDOWS to determine whether we are executing a Windows build. Take a dependency on target.h because this is minimal. Also teach the s2n-bignum file pro-processing where to find target.h even though I don't think this is strictly necessary; non of the pre-processed files include the header file and everywhere the header file is included will have at least base.h. But do it anyway.

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.

@torben-hansen torben-hansen requested a review from a team as a code owner October 9, 2024 16:23
@torben-hansen torben-hansen enabled auto-merge (squash) October 9, 2024 16:26
@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.51%. Comparing base (49215e8) to head (d6d2397).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1912   +/-   ##
=======================================
  Coverage   78.50%   78.51%           
=======================================
  Files         585      585           
  Lines       99681    99681           
  Branches    14265    14271    +6     
=======================================
+ Hits        78257    78260    +3     
+ Misses      20788    20785    -3     
  Partials      636      636           

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

@torben-hansen torben-hansen disabled auto-merge October 9, 2024 18:09
@torben-hansen torben-hansen enabled auto-merge (squash) October 9, 2024 18:09
@torben-hansen torben-hansen merged commit 9ff8458 into aws:main Oct 9, 2024
112 of 115 checks passed
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