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

version» Context lines:

pike.git/lib/modules/SSL.pmod/Connection.pike:786:    send_packet(heartbeat_packet(hb_msg));   }      void handle_heartbeat(string(8bit) s)   {    if (sizeof(s) < 19) return; // Minimum size for valid heartbeats.    Buffer hb_msg = Buffer(s);    int hb_type = hb_msg->read_int(1);    int hb_len = hb_msg->read_int(2);    -  SSL3_DEBUG_MSG("SSL.Connection: Heartbeat %s (%d bytes)", +  SSL3_DEBUG_MSG("SSL.Connection: Heartbeat %s (%d bytes)\n",    fmt_constant(hb_type, "HEARTBEAT_MESSAGE"), hb_len);       string(8bit) payload;    int pad_len = 16;       // RFC 6520 4:    // If the payload_length of a received HeartbeatMessage is too    // large, the received HeartbeatMessage MUST be discarded silently.    if ((hb_len < 0) || ((hb_len + 16) > sizeof(hb_msg))) {   #ifdef SSL3_SIMULATE_HEARTBLEED