summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_lib.c
diff options
context:
space:
mode:
authorjsing <>2021-06-19 16:52:47 +0000
committerjsing <>2021-06-19 16:52:47 +0000
commit25a25bb407e9ed4f33e3dd3ec0f0cf289c46ee5e (patch)
tree7d820c1c57ea372d0362ea2f1759e36cace4a21a /src/lib/libssl/d1_lib.c
parent13bc1028f3bea79117c0675c4741f12c61a65586 (diff)
downloadopenbsd-25a25bb407e9ed4f33e3dd3ec0f0cf289c46ee5e.tar.gz
openbsd-25a25bb407e9ed4f33e3dd3ec0f0cf289c46ee5e.tar.bz2
openbsd-25a25bb407e9ed4f33e3dd3ec0f0cf289c46ee5e.zip
Provide the ability to set the initial DTLS epoch value.
This allows for regress to test edge cases for epoch handling. ok tb@
Diffstat (limited to 'src/lib/libssl/d1_lib.c')
-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 bc00ab8ca4..66895a361f 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.55 2021/06/19 16:38:27 jsing Exp $ */ 1/* $OpenBSD: d1_lib.c,v 1.56 2021/06/19 16:52:47 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)->r_epoch =
201 tls12_record_layer_initial_epoch(s->internal->rl);
202
200 D1I(s)->processed_rcds.epoch = D1I(s)->r_epoch; 203 D1I(s)->processed_rcds.epoch = D1I(s)->r_epoch;
201 D1I(s)->unprocessed_rcds.epoch = D1I(s)->r_epoch + 1; 204 D1I(s)->unprocessed_rcds.epoch = D1I(s)->r_epoch + 1;
202 205