diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 5 | ||||
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index 11735f0d2c..17be6dd182 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.98 2021/06/15 19:09:03 jsing Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.99 2021/06/19 17:21:39 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. |
@@ -1191,6 +1191,7 @@ dtls1_dispatch_alert(SSL *s) | |||
1191 | static DTLS1_BITMAP * | 1191 | static DTLS1_BITMAP * |
1192 | dtls1_get_bitmap(SSL *s, SSL3_RECORD_INTERNAL *rr, unsigned int *is_next_epoch) | 1192 | dtls1_get_bitmap(SSL *s, SSL3_RECORD_INTERNAL *rr, unsigned int *is_next_epoch) |
1193 | { | 1193 | { |
1194 | uint16_t next_epoch = D1I(s)->r_epoch + 1; | ||
1194 | 1195 | ||
1195 | *is_next_epoch = 0; | 1196 | *is_next_epoch = 0; |
1196 | 1197 | ||
@@ -1199,7 +1200,7 @@ dtls1_get_bitmap(SSL *s, SSL3_RECORD_INTERNAL *rr, unsigned int *is_next_epoch) | |||
1199 | return &D1I(s)->bitmap; | 1200 | return &D1I(s)->bitmap; |
1200 | 1201 | ||
1201 | /* Only HM and ALERT messages can be from the next epoch */ | 1202 | /* Only HM and ALERT messages can be from the next epoch */ |
1202 | else if (rr->epoch == (unsigned long)(D1I(s)->r_epoch + 1) && | 1203 | else if (rr->epoch == next_epoch && |
1203 | (rr->type == SSL3_RT_HANDSHAKE || rr->type == SSL3_RT_ALERT)) { | 1204 | (rr->type == SSL3_RT_HANDSHAKE || rr->type == SSL3_RT_ALERT)) { |
1204 | *is_next_epoch = 1; | 1205 | *is_next_epoch = 1; |
1205 | return &D1I(s)->next_bitmap; | 1206 | return &D1I(s)->next_bitmap; |
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 18509438ae..d171ef0984 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.349 2021/06/19 16:52:47 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.350 2021/06/19 17:21:40 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -886,7 +886,7 @@ typedef struct ssl3_record_internal_st { | |||
886 | unsigned int off; /* read/write offset into 'buf' */ | 886 | unsigned int off; /* read/write offset into 'buf' */ |
887 | unsigned char *data; /* pointer to the record data */ | 887 | unsigned char *data; /* pointer to the record data */ |
888 | unsigned char *input; /* where the decode bytes are */ | 888 | unsigned char *input; /* where the decode bytes are */ |
889 | unsigned long epoch; /* epoch number, needed by DTLS1 */ | 889 | uint16_t epoch; /* epoch number, needed by DTLS1 */ |
890 | unsigned char seq_num[8]; /* sequence number, needed by DTLS1 */ | 890 | unsigned char seq_num[8]; /* sequence number, needed by DTLS1 */ |
891 | } SSL3_RECORD_INTERNAL; | 891 | } SSL3_RECORD_INTERNAL; |
892 | 892 | ||