[gnutls-devel] GnuTLS | crypto-selftests: mark CFB8 block sizes tests optional (!1743)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Tue May 23 06:39:20 CEST 2023
Daiki Ueno commented on a discussion on lib/crypto-selftests.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1743#note_1400914600
> - if (!(flags & GNUTLS_SELF_TEST_FLAG_ALL) || ret < 0) \
> - return ret
> +#define CASE(x, func, vectors) \
> + case x: \
> + CHECK(x, func, vectors)
>
> -#define NON_FIPS_CASE(x, func, vectors) \
> - case x: \
> - if (_gnutls_fips_mode_enabled() == 0) { \
> - ret = func(x, V(vectors), flags); \
> - if (!(flags & GNUTLS_SELF_TEST_FLAG_ALL) || ret < 0) \
> - return ret; \
> - }
> +#define NON_FIPS_CASE(x, func, vectors) \
> + case x: \
> + if (_gnutls_fips_mode_enabled() == 0) \
It's actually deliberate because otherwise a stray ";" will be inserted when writing `NON_FIPS_CASE(...);`, though the original code has this issue as well. Perhaps we could use the `do { ... } while (0)` idiom though it might be too much here.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1743#note_1400914600
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/20230523/5d4eeded/attachment-0001.html>
More information about the Gnutls-devel
mailing list