Skip to content

better error when calling s2n_offered_psk_list_choose_psk with empty PSK #5085

@jmayclin

Description

@jmayclin

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions