Removed dependency on rrec from heartbeat processing

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Matt Caswell
2015-02-02 15:47:39 +00:00
parent bd2e3a9512
commit 2c60ed0452
6 changed files with 22 additions and 26 deletions

View File

@@ -1347,16 +1347,12 @@ int dtls1_shutdown(SSL *s)
}
#ifndef OPENSSL_NO_HEARTBEATS
int dtls1_process_heartbeat(SSL *s)
int dtls1_process_heartbeat(SSL *s, unsigned char *p, unsigned int length)
{
unsigned char *p, *pl;
unsigned char *pl;
unsigned short hbtype;
unsigned int payload;
unsigned int padding = 16; /* Use minimum padding */
unsigned int length;
p = SSL3_RECORD_get_data(RECORD_LAYER_get_rrec(&s->rlayer));
length = SSL3_RECORD_get_length(RECORD_LAYER_get_rrec(&s->rlayer));
if (s->msg_callback)
s->msg_callback(0, s->version, TLS1_RT_HEARTBEAT,