Skip to content

Commit 57133c0

Browse files
Add integration script and CI for ruby 3.1 and 3.2 (#1563)
We've finalized our support for Ruby 3.1 and 3.2. This adds the patch and integration CI to test against it. Ruby 3.1 patch contents are as following: 1. Slight logic to properly detect AWS-LC in FIPS mode. 2. Differences in emitted error messages 3. During signature verification, an invalid ASN.1 input raises an error in Ruby/OpenSSL and an actual verification failure returns false. AWS-LC simply returns false for all cases. 4. OpenSSL allows invalid DH parameters to be parsed successfully and invalidates it in a subsequent call to `params_ok?`. AWS-LC simply disallows invalid parameters to be parsed. 5. AWS-LC does not support the serialization of custom/explicit curves. Explicit curves are highly impractical to validate from a security standpoint and have been the source of many CVEs. See the following issues for more details on why explicit curves are discouraged. * openssl/openssl#9286 * openssl/openssl#20119 6. AWS-LC does not support `BN::CONSTTIME`. See 0a211df for more details. 7. AWS-LC does not support DHE ciphersuites in SSL connections. 5 tests have been adjusted accordingly. 8. Changes in pkcs12 are pieces of ruby/ruby@63e9eaa in upstream Ruby. This test was testing with the wrong number of parameters. AWS-LC does not support the "old MSIE extension" mentioned in the commit. 9. Changes in `test/openssl/test_pkey_rsa.rb` are pieces of ruby/ruby@2e5680d in upstream Ruby. It accounts for RSA operations disallowed in FIPS mode in Ruby's RSA tests. The commit diff is a bit too large to muddle with the changes in this PR. It's also fairly recent and not directly applicable to Ruby 3.1's version of the file, so I've only taken pieces that ensure we're not losing coverage. Ruby 3.2 patch contents are nearly identical to the points mentioned above. Only additional thing to note is AWS-LC does key checks while parsing EC Keys and disallows invalid keys to be parsed. This is similar to the DH params discrepancy described above in point 4. 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.
1 parent 637b5d2 commit 57133c0

File tree

5 files changed

+1410
-1
lines changed

5 files changed

+1410
-1
lines changed

.github/workflows/integrations.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,24 @@ jobs:
257257
- name: Run accp build
258258
run: |
259259
./tests/ci/integration/run_accp_integration.sh
260+
ruby-releases:
261+
if: github.repository_owner == 'aws'
262+
strategy:
263+
fail-fast: false
264+
matrix:
265+
fips:
266+
- "0"
267+
- "1"
268+
runs-on: ubuntu-latest
269+
name: Ruby releases (FIPS=${{ matrix.fips}})
270+
steps:
271+
- name: Install OS Dependencies
272+
run: |
273+
sudo apt-get update
274+
sudo apt-get -y --no-install-recommends install cmake gcc ninja-build golang make autoconf ruby libyaml-dev
275+
- uses: actions/checkout@v3
276+
- name: Build AWS-LC, build ruby, run tests
277+
run: |
278+
./tests/ci/integration/run_ruby_integration.sh ruby_3_2 ruby_3_1
279+
env:
280+
FIPS: ${{ matrix.fips }}

tests/ci/common_posix_setup.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ function aws_lc_build() {
166166
${CMAKE_COMMAND} ${AWS_LC_DIR} -GNinja "-B${BUILD_FOLDER}" "-DCMAKE_INSTALL_PREFIX=${INSTALL_FOLDER}" "${@:4}"
167167
${CMAKE_COMMAND} --build ${BUILD_FOLDER} -- install
168168
ls -R ${INSTALL_FOLDER}
169-
rm -rf "${BUILD_FOLDER:?}"/*
170169
}
171170

172171
function print_executable_information {

0 commit comments

Comments
 (0)