-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only abort when RSA PWCT fail in FIPS (#2020)
We've been getting abort failures when building with FIPS mode against Ruby's break tests. The issue happens to be related to the abort call we do when calls to `RSA_generate_key_ex` fail. In the original commit where this was introduced (6bdd4c3), it's mentioned that "It's required that the FIPS module aborts when PCT tests fail in `RSA_check_fips()`." Our current behavior fails regardless of a regular RSA failure or a PWCT failure, which causes regular RSA failures to unintentionally abort as well. This changes aborting to only happen during failures in `RSA_check_fips`. Our existing death tests were also expecting failures during regular RSA failures rather than PWCT failures, so I've tweaked the tests to account for that. Ruby's RSA break test passes successfully with this change. ### Call-outs: The new test is ran when the CFLAG `BORINGSSL_FIPS_BREAK_TESTS` is set, so I've updated our test script to run tests when building with this dimension. This leverages our existing break tests to test PWCT aborting behavior. ### Testing: New test dimension 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
1 parent
1bf38a8
commit 8226a05
Showing
3 changed files
with
28 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters