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

version» Context lines:

pike.git/lib/modules/SSL.pmod/Connection.pike:503:    int level = s[0];    int description = s[1];    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 %d\n", description); +  SSL3_DEBUG_MSG("SSL.Connection: Fatal alert %O\n", +  ALERT_descriptions[description]);    return -1;    }    if (description == ALERT_close_notify)    { -  SSL3_DEBUG_MSG("SSL.Connection: Close notify alert %d\n", description); +  SSL3_DEBUG_MSG("SSL.Connection: %O\n", ALERT_descriptions[description]);    closing |= 2;    return 1;    }    if (description == ALERT_no_certificate)    { -  SSL3_DEBUG_MSG("SSL.Connection: No certificate alert %d\n", description); +  SSL3_DEBUG_MSG("SSL.Connection: %O\n", ALERT_descriptions[description]);       if ((certificate_state == CERT_requested) && (context->auth_level == AUTHLEVEL_ask))    {    certificate_state = CERT_no_certificate;    return 0;    } else {    send_packet(alert(ALERT_fatal,    ((certificate_state == CERT_requested)    ? ALERT_handshake_failure    : ALERT_unexpected_message),    "Certificate required.\n"));    return -1;    }    }   #ifdef SSL3_DEBUG    else -  werror("SSL.Connection: Received warning alert %d\n", description); +  werror("SSL.Connection: Received warning alert %O\n", +  ALERT_descriptions[description]);   #endif    return 0;   }      int handle_change_cipher(int c)   {    if (!expect_change_cipher || (c != 1))    {    SSL3_DEBUG_MSG("SSL.Connection: handle_change_cipher: Unexcepted message!");    send_packet(alert(ALERT_fatal, ALERT_unexpected_message,