Skip to content
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: update callback return value #5136

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

CarolYeh910
Copy link
Contributor

@CarolYeh910 CarolYeh910 commented Feb 20, 2025

Release Summary:

A successful cert validation callback should return only S2N_SUCCESS. Previously, both 0 and any positive return value were considered successful.

Description of changes:

This is a follow-up change on PR #5110

Per our documentation, s2n_cert_validation_callback should return S2N_SUCCESS on success. However, the old behavior accepted both 0 and positive values. This PR aims to fix this inconsistency.

Testing:

Confirmed s2n_cert_validation_callback_test passed with this change

$ cmake --build build/ --target test -- ARGS="-L unit -R s2n_cert_validation_callback_test --output-on-failure"
Running tests...
Test project /home/ubuntu/s2n-tls/build
    Start 18: s2n_cert_validation_callback_test
1/1 Test #18: s2n_cert_validation_callback_test ...   Passed    0.74 sec

100% tests passed, 0 tests failed out of 1

Label Time Summary:
unit    =   0.74 sec*proc (1 test)

Total Test time (real) =   0.74 sec

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@CarolYeh910 CarolYeh910 added this pull request to the merge queue Feb 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 20, 2025
@CarolYeh910 CarolYeh910 added this pull request to the merge queue Feb 21, 2025
Merged via the queue into aws:main with commit 60adeb4 Feb 21, 2025
46 checks passed
@CarolYeh910 CarolYeh910 deleted the fix-callback-return-value branch February 21, 2025 02:04
dougch pushed a commit to dougch/s2n-tls that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants