DTLS handshake fix.
authorMichael Tuexen <tuexen@fh-muenster.de>
Thu, 8 Aug 2013 12:28:55 +0000 (13:28 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 8 Aug 2013 12:32:11 +0000 (13:32 +0100)
Reported by: Prashant Jaikumar <rmstar@gmail.com>

Fix handling of application data received before a handshake.
(cherry picked from commit 0c75eeacd3285b395dc75b65c3e6fe6ffbef59f0)

ssl/d1_pkt.c

index 0bf87be..e0bbcb9 100644 (file)
@@ -847,6 +847,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,