The function _gnutls_hash() does not return error values. The attached patch does fix this.
no_error_values.patch