[gnutls-devel] GnuTLS | Add CI tarball build (!809)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Sat Nov 24 10:47:42 CET 2018


Tim Rühsen commented on a discussion on tests/slow/cipher-api-test.c:

>  			if (ret < 0)
>  				fail("could not add auth data\n");
>  
> -			signal(SIGABRT, custom_abrt);
> -			ret = gnutls_cipher_add_auth(ch, data, 16);
> -			signal(SIGABRT, SIG_DFL);
> -			if (ret >= 0 && error_detected == 0)
> -				fail("succeeded in adding auth data data after partial data were given\n");
> +			if (testmode == 1) {
> +				/* either fails or calls abort() via assert(): */

I will add a comment/description. The short expl is that that call to gnutls_cipher_add_auth() is bad and should either end in an assert() in nettle or (if nettle was built with -NDEBUG) returns an error.

If the assert() triggers, the (child) process abort()s and the parent recognizes the status code as OK (it was an expected failure). If the function returns 0/success, we call fail() because an error was expected.

The testmode is to test different parts of the code. We could instead use three different functions, but that means a lot of code duplication.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/809#note_119762485
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/20181124/2cf5a420/attachment-0001.html>


More information about the Gnutls-devel mailing list