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

version» Context lines:

pike.git/lib/modules/SSL.pmod/Connection.pike:473:    application_q->get());    if (!packet) {    return (state & CONNECTION_local_closing) ? 1 : "";    }       SSL3_DEBUG_MSG("SSL.Connection: writing packet of type %d, %O\n",    packet->content_type, packet->fragment[..6]);    if (packet->content_type == PACKET_alert)    {    if (packet->level == ALERT_fatal) { -  state = [int(0..0)|ConnectionState](state | CONNECTION_local_fatal); +  state = [int(0..0)|ConnectionState](state | CONNECTION_local_fatal | +  CONNECTION_peer_closed);    // SSL3 5.4:    // Alert messages with a level of fatal result in the immediate    // termination of the connection. In this case, other    // connections corresponding to the session may continue, but    // the session identifier must be invalidated, preventing the    // failed session from being used to establish new connections.    if (session) {    context->purge_session(session);    }    } else if (packet->description == ALERT_close_notify) {
pike.git/lib/modules/SSL.pmod/Connection.pike:552:    if (! (ALERT_levels[level] && ALERT_descriptions[description]))    {    send_packet(alert(ALERT_fatal, ALERT_unexpected_message,    "invalid alert\n"));    return -1;    }    if (level == ALERT_fatal)    {    SSL3_DEBUG_MSG("SSL.Connection: Fatal alert %O\n",    ALERT_descriptions[description]); -  state = [int(0..0)|ConnectionState](state | CONNECTION_peer_fatal); +  state = [int(0..0)|ConnectionState](state | CONNECTION_peer_fatal | +  CONNECTION_peer_closed);    return -1;    }    if (description == ALERT_close_notify)    {    SSL3_DEBUG_MSG("SSL.Connection: %O\n", ALERT_descriptions[description]);    state = [int(0..0)|ConnectionState](state | CONNECTION_peer_closed);    return 1;    }    if (description == ALERT_no_certificate)    {