static void info_cb(const SSL *s, int where, int ret)
{
    if (where & SSL_CB_ALERT) {
        HANDSHAKE_EX_DATA *ex_data =
            (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
        if (where & SSL_CB_WRITE) {
            ex_data->alert_sent = ret;
            if (strcmp(SSL_alert_type_string(ret), "F") == 0
                || strcmp(SSL_alert_desc_string(ret), "CN") == 0)
                ex_data->num_fatal_alerts_sent++;
        } else {
            ex_data->alert_received = ret;
        }
    }
}
['static void info_cb(const SSL *s, int where, int ret)\n{\n    if (where & SSL_CB_ALERT) {\n        HANDSHAKE_EX_DATA *ex_data =\n            (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));\n        if (where & SSL_CB_WRITE) {\n            ex_data->alert_sent = ret;\n            if (strcmp(SSL_alert_type_string(ret), "F") == 0\n                || strcmp(SSL_alert_desc_string(ret), "CN") == 0)\n                ex_data->num_fatal_alerts_sent++;\n        } else {\n            ex_data->alert_received = ret;\n        }\n    }\n}', 'void *SSL_get_ex_data(const SSL *s, int idx)\n{\n    return CRYPTO_get_ex_data(&s->ex_data, idx);\n}', 'void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)\n{\n    if (ad->sk == NULL || idx >= sk_void_num(ad->sk))\n        return NULL;\n    return sk_void_value(ad->sk, idx);\n}']