summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2021-06-19 16:38:27 +0000
committerjsing <>2021-06-19 16:38:27 +0000
commit13bc1028f3bea79117c0675c4741f12c61a65586 (patch)
tree92745bb8a3eeab4dbf4efbadeae00cfe067f5bd9
parent2dffa364f081d1380dec0a9d14b61a504bc27b97 (diff)
downloadopenbsd-13bc1028f3bea79117c0675c4741f12c61a65586.tar.gz
openbsd-13bc1028f3bea79117c0675c4741f12c61a65586.tar.bz2
openbsd-13bc1028f3bea79117c0675c4741f12c61a65586.zip
Initialise the epoch for the DTLS processed and unprocessed queues.
Currently these only get correctly initialised when dtls1_process_buffered_records() is called - while this works it is more accidental than intentional. ok tb@
-rw-r--r--src/lib/libssl/d1_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c
index dbc89e6f46..bc00ab8ca4 100644
--- a/src/lib/libssl/d1_lib.c
+++ b/src/lib/libssl/d1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_lib.c,v 1.54 2021/05/16 13:56:30 jsing Exp $ */ 1/* $OpenBSD: d1_lib.c,v 1.55 2021/06/19 16:38:27 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -197,6 +197,9 @@ dtls1_clear(SSL *s)
197 memset(s->d1, 0, sizeof(*s->d1)); 197 memset(s->d1, 0, sizeof(*s->d1));
198 s->d1->internal = internal; 198 s->d1->internal = internal;
199 199
200 D1I(s)->processed_rcds.epoch = D1I(s)->r_epoch;
201 D1I(s)->unprocessed_rcds.epoch = D1I(s)->r_epoch + 1;
202
200 if (s->server) { 203 if (s->server) {
201 D1I(s)->cookie_len = sizeof(D1I(s)->cookie); 204 D1I(s)->cookie_len = sizeof(D1I(s)->cookie);
202 } 205 }