Moved record_* functions to tls_session_t structure, so that