From: Michael Tuexen Date: Thu, 8 Aug 2013 12:28:55 +0000 (+0100) Subject: DTLS handshake fix. X-Git-Tag: master-post-reformat~1221 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=0c75eeacd3285b395dc75b65c3e6fe6ffbef59f0 DTLS handshake fix. Reported by: Prashant Jaikumar Fix handling of application data received before a handshake. --- diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 9b600fdf53..4464a305d2 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -848,6 +848,12 @@ start: } } + if (s->d1->listen && rr->type != SSL3_RT_HANDSHAKE) + { + rr->length = 0; + goto start; + } + /* we now have a packet which can be read and processed */ if (s->s3->change_cipher_spec /* set when we receive ChangeCipherSpec,