]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Resetting the cookie_len should set the cookie_len to 0.
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Fri, 10 Oct 2025 12:36:31 +0000 (20:36 +0800)
committerTomas Mraz <tomas@openssl.org>
Fri, 17 Oct 2025 17:11:26 +0000 (19:11 +0200)
Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28817)

ssl/d1_lib.c

index 014657e599b3e30f432ebeaad018aa22627fe95e..4a50f0ddbe97f756eb51a72ea7a77d376e357d4c 100644 (file)
@@ -84,13 +84,6 @@ int dtls1_new(SSL *ssl)
     d1->buffered_messages = pqueue_new();
     d1->sent_messages = pqueue_new();
 
-    if (s->server) {
-        d1->cookie_len = sizeof(s->d1->cookie);
-    }
-
-    d1->link_mtu = 0;
-    d1->mtu = 0;
-
     if (d1->buffered_messages == NULL || d1->sent_messages == NULL) {
         pqueue_free(d1->buffered_messages);
         pqueue_free(d1->sent_messages);
@@ -199,10 +192,6 @@ int dtls1_clear(SSL *ssl)
         /* Restore the timer callback from previous state */
         s->d1->timer_cb = timer_cb;
 
-        if (s->server) {
-            s->d1->cookie_len = sizeof(s->d1->cookie);
-        }
-
         if (SSL_get_options(ssl) & SSL_OP_NO_QUERY_MTU) {
             s->d1->mtu = mtu;
             s->d1->link_mtu = link_mtu;