PR: 2658
[openssl.git] / ssl / d1_srvr.c
index 24e055308617fc0907ad6d7bb9f21f0cac94900a..6af53b2ff40d5e596022fcfea711ea7dc7804675 100644 (file)
@@ -186,6 +186,19 @@ int dtls1_accept(SSL *s)
                return(-1);
                }
 
+#ifndef OPENSSL_NO_HEARTBEATS
+       /* If we're awaiting a HeartbeatResponse, pretend we
+        * already got and don't await it anymore, because
+        * Heartbeats don't make sense during handshakes anyway.
+        */
+       if (s->tlsext_hb_pending)
+               {
+               dtls1_stop_timer(s);
+               s->tlsext_hb_pending = 0;
+               s->tlsext_hb_seq++;
+               }
+#endif
+
        for (;;)
                {
                state=s->state;