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

(cherry picked from commit 72394c9a1a6a6b07edf43eb2ad7e95e1093ada1b)
  • Loading branch information
dongbeiouba committed Jul 15, 2024
1 parent 7f4500f commit e50a6b6
Show file tree
Hide file tree
Showing 5 changed files with 449 additions and 244 deletions.
6 changes: 6 additions & 0 deletions test/helpers/handshake.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,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 e50a6b6

Please sign in to comment.