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

Algorithm for choosing ticket key needs better unit tests #3922

Open
maddeleine opened this issue Apr 5, 2023 · 0 comments
Open

Algorithm for choosing ticket key needs better unit tests #3922

maddeleine opened this issue Apr 5, 2023 · 0 comments

Comments

@maddeleine
Copy link
Contributor

maddeleine commented Apr 5, 2023

Security issue notifications

If you discover a potential security issue in s2n we ask that you notify
AWS Security via our vulnerability reporting page. Please do not create a public github issue.

Problem:

While working on this PR #3913 I noticed that we don't have any unit tests for s2n_compute_weight_of_encrypt_decrypt_keys(). This is a pretty complicated function and we should add tests explicitly for the random float generation and the calculating of key weights. Currently the function is implicitly being tested in s2n_session_ticket_test.c through self-talk tests, which is not fine-grained enough to fully test the key selection algorithm.

Solution:

Some units tests for our ticket key selection algorithm. Additionally it may a good idea to refactor the function since it is doing several different things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants