summaryrefslogtreecommitdiffstats
path: root/ssl/record
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-02-02 15:47:39 +0000
committerMatt Caswell <matt@openssl.org>2015-03-26 15:02:00 +0000
commit2c60ed0452919ea9a67886685e2fa5c8b9330620 (patch)
treeb70dedf9bc6ea8964fde43b276ffeb9b2740ac67 /ssl/record
parentbd2e3a9512523ff888982cd91e830fc49f1a9595 (diff)
Removed dependency on rrec from heartbeat processing
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/record')
-rw-r--r--ssl/record/d1_pkt.c4
-rw-r--r--ssl/record/s3_pkt.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/ssl/record/d1_pkt.c b/ssl/record/d1_pkt.c
index e85e94dd74..2f2417d7a3 100644
--- a/ssl/record/d1_pkt.c
+++ b/ssl/record/d1_pkt.c
@@ -585,10 +585,10 @@ int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
#ifndef OPENSSL_NO_HEARTBEATS
else if (rr->type == TLS1_RT_HEARTBEAT) {
/* We allow a 0 return */
- if(dtls1_process_heartbeat(s) < 0) {
+ if(dtls1_process_heartbeat(s, SSL3_RECORD_get_data(&s->rlayer.rrec),
+ SSL3_RECORD_get_length(&s->rlayer.rrec)) < 0) {
return -1;
}
-
/* Exit and notify application to read again */
rr->length = 0;
s->rwstate = SSL_READING;
diff --git a/ssl/record/s3_pkt.c b/ssl/record/s3_pkt.c
index 7653d8b8d6..61288f21ed 100644
--- a/ssl/record/s3_pkt.c
+++ b/ssl/record/s3_pkt.c
@@ -1054,7 +1054,8 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
#ifndef OPENSSL_NO_HEARTBEATS
else if (rr->type == TLS1_RT_HEARTBEAT) {
/* We can ignore 0 return values */
- if(tls1_process_heartbeat(s) < 0) {
+ if(tls1_process_heartbeat(s, SSL3_RECORD_get_data(&s->rlayer.rrec),
+ SSL3_RECORD_get_length(&s->rlayer.rrec)) < 0) {
return -1;
}