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

A working FIPS build for Windows #309

Merged
merged 2 commits into from
Jan 25, 2024
Merged

A working FIPS build for Windows #309

merged 2 commits into from
Jan 25, 2024

Conversation

justsmth
Copy link
Contributor

@justsmth justsmth commented Jan 12, 2024

Issues:

N/A

Description of changes:

  • A working FIPS build for Windows.
  • This change uses a Windows batch script to execute vcvarsall.bat and then display all of the environment variables that were set.
    • Our build-script parses environment variables from the output of the script and sets those variables to be available for CMake.

Call-outs:

N/A

Testing:

  • Test succeeded on my Windows host.

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.

@justsmth justsmth requested a review from a team as a code owner January 12, 2024 19:53
@justsmth justsmth marked this pull request as draft January 12, 2024 19:54
aws-lc-fips-sys/CMakeLists.txt Outdated Show resolved Hide resolved
aws-lc-fips-sys/CMakeLists.txt Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c5bb144) 95.91% compared to head (11e9fee) 95.91%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #309   +/-   ##
=======================================
  Coverage   95.91%   95.91%           
=======================================
  Files          60       60           
  Lines        8522     8522           
=======================================
  Hits         8174     8174           
  Misses        348      348           

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

@justsmth justsmth force-pushed the fips-windows branch 5 times, most recently from 2543ee8 to f6ed0de Compare January 18, 2024 23:02
@justsmth justsmth changed the title DRAFT: A working FIPS build for Windows A working FIPS build for Windows Jan 18, 2024
@justsmth justsmth marked this pull request as ready for review January 18, 2024 23:03
@justsmth justsmth force-pushed the fips-windows branch 2 times, most recently from b94fce2 to d10057f Compare January 19, 2024 02:04
int ERR_GET_LIB_RUST(uint32_t packed_error);
int ERR_GET_REASON_RUST(uint32_t packed_error);
int ERR_GET_FUNC_RUST(uint32_t packed_error);
AWS_LC_SYS_EXPORT int ERR_GET_LIB_RUST(uint32_t packed_error);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use OPENSSL_EXPORT from "openssl/base.h"? Seems like it would come in handy, so we wouldn't need duplicate definitions in both rust_wrapper.hs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is that intended for use outside the library? It might work if we define BORINGSSL_IMPLEMENTATION and BORINGSSL_SHARED_LIBRARY prior to its include.

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm I was under the impression that these were already defined if we built with AWS-LC.

Not a blocker though, just curious if it was reusable

int ERR_GET_LIB_RUST(uint32_t packed_error);
int ERR_GET_REASON_RUST(uint32_t packed_error);
int ERR_GET_FUNC_RUST(uint32_t packed_error);
AWS_LC_SYS_EXPORT int ERR_GET_LIB_RUST(uint32_t packed_error);
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm I was under the impression that these were already defined if we built with AWS-LC.

Not a blocker though, just curious if it was reusable

@justsmth justsmth merged commit c8d4520 into aws:main Jan 25, 2024
115 of 125 checks passed
@justsmth justsmth deleted the fips-windows branch January 25, 2024 02:33
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.

5 participants