summaryrefslogtreecommitdiff
path: root/lib/ssl/tls13con.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssl/tls13con.c')
-rw-r--r--lib/ssl/tls13con.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ssl/tls13con.c b/lib/ssl/tls13con.c
index 7a7134416..18a330eba 100644
--- a/lib/ssl/tls13con.c
+++ b/lib/ssl/tls13con.c
@@ -1375,7 +1375,12 @@ tls13_HandleClientHelloPart2(sslSocket *ss,
ssl_ReleaseSpecWriteLock(ss);
}
- PORT_Assert(ss->xtnData.cookie.len);
+ if (!ssl3_ExtensionNegotiated(ss, ssl_tls13_cookie_xtn) ||
+ !ss->xtnData.cookie.len) {
+ FATAL_ERROR(ss, SSL_ERROR_MISSING_COOKIE_EXTENSION,
+ missing_extension);
+ goto loser;
+ }
PRINT_BUF(50, (ss, "Client sent cookie",
ss->xtnData.cookie.data, ss->xtnData.cookie.len));