[gnutls-devel] GnuTLS | gnutls | gnutls_session_get_desc: avoid printing a NULL value (!1038)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Sat Jun 29 20:37:27 CEST 2019




Nikos Mavrogiannopoulos commented on a discussion on tests/openconnect-dtls12.c: https://gitlab.com/gnutls/gnutls/merge_requests/1038#note_186716864

> +	while (ret < 0 && gnutls_error_is_fatal(ret) == 0);
> +
> +	if (ret < 0) {
> +		fail("client: Handshake failed\n");
> +		gnutls_perror(ret);
> +		exit(1);
> +	} else {
> +		if (debug)
> +			success("client: Handshake was completed\n");
> +	}
> +
> +	desc = gnutls_session_get_desc(session);
> +	if (desc == NULL)
> +		fail("client: gnutls_session_get_desc: NULL\n");
> +
> +	if (strstr(desc, "null") != NULL)

Indeed, it will cover other possible regressions too. Updated.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1038#note_186716864
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190629/cf2cd423/attachment.html>


More information about the Gnutls-devel mailing list