Skip to content

Commit

Permalink
Allow an empty NPN/ALPN protocol list in the tests
Browse files Browse the repository at this point in the history
Allow ourselves to configure an empty NPN/ALPN protocol list and test what
happens if we do.

Follow on from CVE-2024-5535

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#24718)

(cherry picked from commit c54e56f)
  • Loading branch information
mattcaswell authored and bernd-edlinger committed Jun 30, 2024
1 parent a2426a0 commit 00fd233
Show file tree
Hide file tree
Showing 5 changed files with 449 additions and 244 deletions.
6 changes: 6 additions & 0 deletions test/handshake_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ static int parse_protos(const char *protos, unsigned char **out, size_t *outlen)

len = strlen(protos);

if (len == 0) {
*out = NULL;
*outlen = 0;
return 1;
}

/* Should never have reuse. */
if (!TEST_ptr_null(*out)
/* Test values are small, so we omit length limit checks. */
Expand Down
Loading

0 comments on commit 00fd233

Please sign in to comment.