From 9f4dd3e3e32af20c3bbeb5ac8fc7bb0a43e7a78c Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 14 Apr 2010 00:03:13 +0000 Subject: [PATCH] PR: 2228 Submitted By: Robin Seggelmann Fix DTLS buffer record MAC failure bug. --- ssl/d1_pkt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 20d24b6fd8..93b3408be5 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -196,6 +196,9 @@ dtls1_copy_record(SSL *s, pitem *item) s->packet_length = rdata->packet_length; memcpy(&(s->s3->rbuf), &(rdata->rbuf), sizeof(SSL3_BUFFER)); memcpy(&(s->s3->rrec), &(rdata->rrec), sizeof(SSL3_RECORD)); + + /* Set proper sequence number for mac calculation */ + memcpy(&(s->s3->read_sequence[2]), &(rdata->packet[5]), 6); return(1); } -- 2.25.1