Skip to content

better error when calling s2n_offered_psk_list_choose_psk with empty PSK #5085

Open
@jmayclin

Description

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.

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions