diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-12-31 23:00:36 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-12-31 23:00:36 +0000 |
commit | bd6941cfaa31ee8a3f8661cb98227a5cbcc0f9f3 (patch) | |
tree | 218fef78d2db96f5eb399893de2f44f448c58a84 /ssl/s3_clnt.c | |
parent | 578519edd0d0a810a11bfb7baede0f7b99c7d92b (diff) |
PR: 2658
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Support for TLS/DTLS heartbeats.
Diffstat (limited to 'ssl/s3_clnt.c')
-rw-r--r-- | ssl/s3_clnt.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 8874ce8818..ff1cff23d0 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -203,6 +203,18 @@ int ssl3_connect(SSL *s) s->in_handshake++; if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s); +#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) + { + s->tlsext_hb_pending = 0; + s->tlsext_hb_seq++; + } +#endif + for (;;) { state=s->state; |