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

better error when calling s2n_offered_psk_list_choose_psk with empty PSK #5085

Open
jmayclin opened this issue Feb 5, 2025 · 0 comments
Open

Comments

@jmayclin
Copy link
Contributor

jmayclin commented Feb 5, 2025

Problem:

The following returns an internal error

struct s2n_offered_psk_list* list = ...

// this psk is allocated, but not actually set to any real values
struct s2n_offered_psk* uninitialized_psk = s2n_offered_psk_new();

// this returns an internal error.
s2n_offered_psk_list_choose_psk(empty_psk, 

We should not expect internal errors to be returned from library code unless something has gone very wrong.

Solution:

This should probably be some kind of usage error.

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

1 participant