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

Refactor: change set/get_decryption_key return type to S2N_RESULT in s2n_cipher struct #4638

Merged
merged 6 commits into from
Jul 10, 2024

Conversation

jouho
Copy link
Contributor

@jouho jouho commented Jul 2, 2024

Resolved issues:

Part of #3983

Description of changes:

  • Change return type of set_decryption_key and get_decryption_key from int to S2N_RESULT
    int (*set_decryption_key)(struct s2n_session_key *key, struct s2n_blob *in);
    int (*set_encryption_key)(struct s2n_session_key *key, struct s2n_blob *in);
  • Majority of changes are to adapt to correct return types, like converting S2N_SUCCESS to S2N_OK, POSIX_GUARD to POSIX_GUARD_RESULT, and etc.

Call-outs:

Testing:

Confirmed all unit tests pass. Will address any failures in CI.

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

@github-actions github-actions bot added the s2n-core team label Jul 2, 2024
@jouho jouho changed the title change return type from int to S2N_RESULT refactor: change return type from int to S2N_RESULT: set_decryption_key and get_decryption_key Jul 2, 2024
@jouho jouho changed the title refactor: change return type from int to S2N_RESULT: set_decryption_key and get_decryption_key Refactor: change set/get_decryption_key return type to S2N_RESULT in s2n_cipher struct Jul 2, 2024
@jouho jouho requested review from lrstewart and maddeleine July 2, 2024 22:14
@jouho jouho marked this pull request as ready for review July 2, 2024 22:55
Copy link
Contributor

@maddeleine maddeleine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this stuff up :)

@jouho jouho requested a review from lrstewart July 10, 2024 17:44
@jouho jouho enabled auto-merge (squash) July 10, 2024 17:48
@jouho jouho merged commit ed4be6e into main Jul 10, 2024
37 checks passed
@jouho jouho deleted the refactor-return-type-cipher-key branch July 10, 2024 20:57
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