void print_session_id(SSL_SESSION *sess) {
    const unsigned char *session_id;
    unsigned int session_id_length;
    char session_id_txt[2*SSL_MAX_SSL_SESSION_ID_LENGTH+1];

    session_id=SSL_SESSION_get_id(sess, &session_id_length);
    bin2hexstring(session_id, session_id_length,
        session_id_txt, sizeof session_id_txt);
    s_log(LOG_INFO, "Session id: %s", session_id_txt);
}
void print_session_id(SSL_SESSION *sess) {
    const unsigned char *session_id;
    unsigned int session_id_length;
    char session_id_txt[2*SSL_MAX_SSL_SESSION_ID_LENGTH+1];

    session_id=SSL_SESSION_get_id(sess, &session_id_length);
    bin2hexstring(session_id, session_id_length,
        session_id_txt, sizeof session_id_txt);
    s_log(LOG_INFO, "Session id: %s", session_id_txt);
}