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_pkt.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_pkt.c')
-rw-r--r-- | ssl/s3_pkt.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 33be6badbc..3c56a86933 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -1070,6 +1070,19 @@ start: dest = s->s3->alert_fragment; dest_len = &s->s3->alert_fragment_len; } +#ifndef OPENSSL_NO_HEARTBEATS + else if (rr->type == TLS1_RT_HEARTBEAT) + { + tls1_process_heartbeat(s); + + /* Exit and notify application to read again */ + rr->length = 0; + s->rwstate=SSL_READING; + BIO_clear_retry_flags(SSL_get_rbio(s)); + BIO_set_retry_read(SSL_get_rbio(s)); + return(-1); + } +#endif if (dest_maxlen > 0) { |