PR: 2228
authorDr. Stephen Henson <steve@openssl.org>
Wed, 14 Apr 2010 00:03:13 +0000 (00:03 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 14 Apr 2010 00:03:13 +0000 (00:03 +0000)
Submitted By: Robin Seggelmann <seggelmann@fh-muenster.de>

Fix DTLS buffer record MAC failure bug.

ssl/d1_pkt.c

index 20d24b6fd8da186f911a8bec9b7b94f740ef78ed..93b3408be53e8024b3c85c88c8215e377df8278a 100644 (file)
@@ -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);
     }