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 integration patches/CI for Ruby main and 3.3 #2071

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

samuel40791765
Copy link
Contributor

Issues:

Resolves CryptoAlg-2784

Description of changes:

Ruby 3.3 is relatively the same as 3.2 with just one more test failure due to conflicting error messages.
Ruby's master branch has added much more however.

  1. More tests revolving internal session caching on the SSL client. We don't support these tests and I've adjusted accordingly.
  2. We don't support the ancient MSIE extensions that this PKCS12 commit introduces: ruby/ruby@63e9eaa I don't think there's an actual ask for us to support this, so I've ifdefed out the symbols and skipped the test when building with AWS-LC.
  3. The PKCS8 RSA private key in test/openssl/pkey_rsa.rb generated by certtool isn't parsable by us. I've pinned down the reason to a missing NULL field in the ASN1 contents. I've cut an issue to gnutls, more details can be found there.
    I've replaced the file that Ruby's been using for the time being and replaced the original generation to use OpenSSL instead. OpenSSL's PKCS8 files adhere to the RFC.

Call-outs:

N/A

Testing:

New CI

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.

@samuel40791765 samuel40791765 requested a review from a team as a code owner December 20, 2024 01:38
@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.76%. Comparing base (39b3fae) to head (abf9d23).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2071   +/-   ##
=======================================
  Coverage   78.75%   78.76%           
=======================================
  Files         598      598           
  Lines      103650   103650           
  Branches    14718    14720    +2     
=======================================
+ Hits        81633    81638    +5     
+ Misses      21366    21357    -9     
- Partials      651      655    +4     

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

@WillChilds-Klein
Copy link
Contributor

WillChilds-Klein commented Dec 30, 2024

Per a recent test run, it looks like we need to implement PKCS12_set_mac as of last week:

  ./test/runner.rb: OpenSSL::TestPKCS12#test_set_mac_pkcs12kdf: symbol lookup error: /home/runner/work/aws-lc/aws-lc/RUBY_BUILD_ROOT/ruby-src/master/.ext/x86_64-linux/openssl.so: undefined symbol: PKCS12_set_mac
  make: *** [uncommon.mk:963: yes-test-all] Error 127

Even when under review, these integration tests help us respond to upstream changes :)

@WillChilds-Klein
Copy link
Contributor

I've replaced the file that Ruby's been using for the time being and replaced the original generation to use OpenSSL instead.

Are we planning to submit a PR upstream to Ruby?

@samuel40791765
Copy link
Contributor Author

Ahh I'll put up a PR to add support for PKCS12_set_mac. Thanks for the call out!

Are we planning to submit a PR upstream to Ruby?

Yeah I've submitted a PR upstream and cut an issue to GnuTLS as well. ruby/openssl#830

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