Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve build and fix X509 test failures for Ruby (#1887)
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 gap 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.
- Loading branch information