summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorFrederik Wedel-Heinen <frederik.wedel-heinen@dencrypt.dk>2023-10-02 09:49:34 +0200
committerPauli <pauli@openssl.org>2023-10-04 07:53:30 +1100
commit4b5b2239d8752f8dd413872057c57ef9e1a1a591 (patch)
tree402088b0946ee1b607176c0ff71745edd013e91c /ssl
parent6f66602eaa0a034847e9b1347c108b82c60b41d7 (diff)
Occupy the rec_version field of a decoded dtls record
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22238)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/record/methods/dtls_meth.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ssl/record/methods/dtls_meth.c b/ssl/record/methods/dtls_meth.c
index fd89038eb0..7205283173 100644
--- a/ssl/record/methods/dtls_meth.c
+++ b/ssl/record/methods/dtls_meth.c
@@ -383,7 +383,6 @@ int dtls_get_more_records(OSSL_RECORD_LAYER *rl)
size_t more, n;
TLS_RL_RECORD *rr;
unsigned char *p = NULL;
- unsigned short version;
DTLS_BITMAP *bitmap;
unsigned int is_next_epoch;
@@ -438,7 +437,7 @@ int dtls_get_more_records(OSSL_RECORD_LAYER *rl)
rr->type = *(p++);
ssl_major = *(p++);
ssl_minor = *(p++);
- version = (ssl_major << 8) | ssl_minor;
+ rr->rec_version = (ssl_major << 8) | ssl_minor;
/* sequence number is 64 bits, with top 2 bytes = epoch */
n2s(p, rr->epoch);
@@ -453,7 +452,7 @@ int dtls_get_more_records(OSSL_RECORD_LAYER *rl)
* version number (e.g. because of protocol version errors)
*/
if (!rl->is_first_record && rr->type != SSL3_RT_ALERT) {
- if (version != rl->version) {
+ if (rr->rec_version != rl->version) {
/* unexpected version, silently discard */
rr->length = 0;
rl->packet_length = 0;