pike.git / lib / modules / SSL.pmod / Connection.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Connection.pike:870:    case HEARTBEAT_MESSAGE_request:    // RFC 6520 4:    // When a HeartbeatRequest message is received and sending a    // HeartbeatResponse is not prohibited as described elsewhere in    // this document, the receiver MUST send a corresponding    // HeartbeatResponse message carrying an exact copy of the payload    // of the received HeartbeatRequest.    hb_msg = Buffer();    hb_msg->add_int(HEARTBEAT_MESSAGE_response, 1);    hb_msg->add_int(hb_len, 2); -  hb_msg->add(payload, random_string(pad_len)); +  hb_msg->add(payload); +  hb_msg->add(random_string(pad_len));    send_packet(heartbeat_packet(hb_msg));    break;    case HEARTBEAT_MESSAGE_response:    // RFC 6520 4:    // If a received HeartbeatResponse message does not contain the    // expected payload, the message MUST be discarded silently.    if ((sizeof(payload) == 16) && heartbeat_decode) {    hb_msg = Buffer(heartbeat_decode->crypt(payload));    int a = hb_msg->read_int(8);    int b = hb_msg->read_int(8);