Skip to content

Commit b208f36

Browse files
copilot fix for ECH SNI logic
1 parent fad33e9 commit b208f36

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/tls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2362,7 +2362,8 @@ static int TLSX_SNI_Parse(WOLFSSL* ssl, const byte* input, word16 length,
23622362
#endif
23632363

23642364
#if defined(HAVE_ECH)
2365-
if (ech != NULL && ech->sniState == ECH_INNER_SNI_ATTEMPT) {
2365+
if (ech != NULL && ech->sniState == ECH_INNER_SNI_ATTEMPT &&
2366+
ech->privateName != NULL) {
23662367
matched = cacheOnly || (XSTRLEN(ech->privateName) == size &&
23672368
XSTRNCMP(ech->privateName, (const char*)input + offset, size) == 0);
23682369
}

0 commit comments

Comments
 (0)