8000 Improve build and fix X509 test failures for Ruby by samuel40791765 · Pull Request #1887 · aws/aws-lc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve build and fix X509 test failures for Ruby #1887

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

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

samuel40791765
Copy link
Contributor

Issues:

Resolves CryptoAlg-2701

Description of changes:

  1. bignum_to_string is called when trying to print out the X509 Extension value. Initially I thought the value wasn't being set correctly, but it turns out that we were printing the value in hex form, rather than decimal (which OpenSSL does and Ruby expects). AWS-LC prints the hex value if the value is more than 32 bits, while OpenSSL has a much more lax restriction at 128 bits. Tweaking this to align with OpenSSL gets past the test for test_x509crl.rb. Tweaking the value to align with OpenSSL gets past the test.

  2. Great news is I don't think we need to do anything for the test failure in test_x509req. This was a testing mistake on Ruby's end, documented in this commit: ruby/ruby@6b12013
    Only version 1 is available for CSRs and Ruby attempts to set an invalid version in its tests. OpenSSL 3.3 disallows this behavior now and Ruby has removed the test in it's mainline branch. We can brush up the patch to account for this and skip the test with AWS-LC.

  3. I also took the chance to add back some of the defines Ruby depends on as no-ops. The X509 defines aren't actually used in neither OpenSSL or AWS-LC as found by this commit: 496838a

Call-outs:

N/A

Testing:

N/A

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.46%. Comparing base (36e0307) to head (3e9f334).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1887      +/-   ##
==========================================
- Coverage   78.50%   78.46%   -0.04%     
==========================================
  Files         585      585              
  Lines       99516    99516              
  Branches    14244    14243       -1     
==========================================
- Hits        78122    78090      -32     
- Misses      20759    20790      +31     
- Partials      635      636       +1     

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

@samuel40791765 samuel40791765 enabled auto-merge (squash) October 1, 2024 23:21
@samuel40791765 samuel40791765 merged commit 0c846a7 into aws:main Oct 2, 2024
107 of 110 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
0