Branch: Tag:

2015-03-31

2015-03-31 03:54:13 by Martin Nilsson <nilsson@opera.com>

Give less data to the alert_callback to avoid adding new data to buffered data.

919:    // That enables the caller to check for a clean close, and    // to get the leftovers after the SSL connection.    -  /* If alert_callback is called, this data is passed as an argument */ -  string(8bit) alert_context = (left_over || "") + data; -  +     string(8bit) res = "";    Packet packet;    while (packet = recv_packet(data))
932:    { /* Reply alert */    SSL3_DEBUG_MSG("SSL.Connection: Bad received packet\n");    if (alert_callback) -  alert_callback(packet, current_read_state->seq_num, alert_context); +  alert_callback(packet, current_read_state->seq_num, left_over);    if (this && packet)    send_packet(packet);    if ((!packet) || (!this) || (packet->level == ALERT_fatal))