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:31:54 +0000 (13:31 +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 0bf87be6d21000f19ae070f1d836a7920ca4f10f..e0bbcb982d6ad0c39e9bf5debc3c3325f618b949 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,