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

Add build support for AWS-LC #852

Merged
merged 1 commit into from
Feb 11, 2025
Merged

Conversation

samuel40791765
Copy link
Contributor

Follow up from #833

This contribution is to add basic build support for AWS-LC in the ruby/openssl gem. These changes represent the build portion of a larger patch in the AWS-LC's Ruby integration CI.

CI changes

  1. I've split the patch up to make it easier to digest, but that forces my hand to turn off testing in the AWS-LC CI for the time being. However, do let me know if you would prefer to review the tests adjustments in the same PR and I can remove the temporary CI workaround :).
  2. AWS-LC has a few no-op functions and we use the -Wdeprecated-declarations to alert the consuming application of these. I've leveraged the skip-warnings CI option so that the build doesn't fail.

Build adjustments

  1. AWS-LC FIPS mode is decided at compile time. This is different from OpenSSL's togglable FIPS switch, so I've adjusted the build to account for this.
  2. AWS-LC does not support for the two KEY_SIG or KEY_EX flags that were only ever supported by old MSIE.
  3. AWS-LC has no current support post handshake authentication in TLS 1.3.
  4. EC_GROUP structures for named curves in AWS-LC are constant, static, and immutable by default. This means that EC_GROUP_set_* functions are essentially no-ops due to the immutability of the structure. We've introduced a new API for consumers that depend on the OpenSSL's default mutability of the EC_GROUP structure called EC_GROUP_new_by_curve_name_mutable. Since Ruby has a bit of functionality that's dependent on the mutability of these structures, I've made the corresponding adjustments to allow things to work as expected.

test/openssl/utils.rb Outdated Show resolved Hide resolved
@rhenium
Copy link
Member

rhenium commented Feb 6, 2025

Thanks! The changes look good to me.

CI changes
Build adjustments

Please include those details in the commit message, too.

@samuel40791765 samuel40791765 force-pushed the aws-lc-support-1 branch 3 times, most recently from 588c306 to c850f6e Compare February 6, 2025 22:19
test/openssl/utils.rb Outdated Show resolved Hide resolved
CI Changes
1. I've split the original patch up to make it easier to digest, but
that forces my hand to turn off testing in the AWS-LC CI for the time
being. However, do let me know if you would prefer to review the test
adjustments in the same PR and I can remove the temporary CI workaround.
2. AWS-LC has a few no-op functions and we use -Wdeprecated-declarations
to alert the consuming application of these. I've leveraged the
skip-warnings CI option so that the build doesn't fail.

Build Adjustments
1. AWS-LC FIPS mode is decided at compile time. This is different from
OpenSSL's togglable FIPS switch, so I've adjusted the build to account
for this.
2. AWS-LC does not support for the two KEY_SIG or KEY_EX flags that were
only ever supported by old MSIE.
3. AWS-LC has no current support for post handshake authentication in
TLS 1.3.
4. EC_GROUP structures for named curves in AWS-LC are constant, static,
and immutable by default. This means that the EC_GROUP_set_* functions
are essentially no-ops due to the immutability of the structure. We've
introduced a new API for consumers that depend on the OpenSSL's default
mutability of the EC_GROUP structure called
EC_GROUP_new_by_curve_name_mutable. Since Ruby has a bit of
functionality that's dependent on the mutability of these structures,
I've made the corresponding adjustments to allow things to work as
expected.
@rhenium rhenium merged commit 697d449 into ruby:master Feb 11, 2025
54 checks passed
@rhenium
Copy link
Member

rhenium commented Feb 11, 2025

The changes look good to me. Thank you for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants