-
Notifications
You must be signed in to change notification settings - Fork 721
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
fix: cert verify test fix #4545
Merged
Merged
Conversation
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
maddeleine
reviewed
May 8, 2024
maddeleine
reviewed
May 13, 2024
It looks like this test is no failing when we build with FIPS-validated libcryptos? You'll need to investigate that. |
maddeleine
reviewed
May 15, 2024
maddeleine
reviewed
May 16, 2024
maddeleine
approved these changes
May 16, 2024
lrstewart
reviewed
May 21, 2024
lrstewart
approved these changes
May 24, 2024
maddeleine
approved these changes
May 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolved issues:
Resolves #4431
Description of changes:
Previously, a test case was not running due to missing
#include "crypto/s2n_rsa_pss.h"
. This is now added so the corresponding test is running.One of the test cases were failing even if the tests were enabled and this change fixes it. Specifically, the test was failing on calling s2n_tls_cert_verify_send() because The test runs in a for-loop with different configuration. The first iteration uses s2n_ecdsa_sha256 as signature scheme for the test and the second iteration uses s2n_rsa_pss_pss_sha256 as the signature scheme. The first iteration passes, but the second iteration fails because we're always setting test_scheme.sig_alg = S2N_SIGNATURE_ECDSA; this causes mismatch with RSA_PSS_PSS when sending cert_verify.
Negative test cases were using a single connection object to send and receive cert_verify message. This is an incorrect set up as we do not want to introduce another source of failure other than the ones we are explicitly testing,. Therefore the tests are modified to use two connections (sending_conn and verifying_conn) to properly simulate the test cases
In order to get better test result, change EXPECT_FAILURE() calls to EXPECT_FAILURE_WITH_ERRNO() with specific error to expect in each test case
Clean up code to reduce redundancy and improve readability
Call-outs:
Testing:
Confirmed s2n_tls_cert_verify_test now runs all tests and passes all cases
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.