ssl: check errors of gnutls_session_get_data