On Thu, 2018-02-22 at 07:54 +0100, Niels Möller wrote:
nisse@lysator.liu.se (Niels Möller) writes:
- Delete the old aes_* interface, in favor of aes128_, aes192_*
and aes256_*.
I've now made a branch for this, delete-old-aes.
And it seems building gnutls with this branch fails, see https://gitlab.com/gnutls/nettle/-/jobs/53760965
aes-padlock.c: In function 'padlock_aes_cipher_setkey': aes-padlock.c:65:17: error: storage size of 'nc' isn't known struct aes_ctx nc; ^~
It's great to have that ci job set up.
Thanks for bringing that up. I have a quick fix for that, although I no longer have such systems for checking. I dropped AES-192 accelerated support as part of that patch as well. https://gitlab.com/gnutls/gnutls/merge_requests/602
How widely used are these macros? Searching debian code: https://codesearch.debian.net/search?q=aes_set_encrypt_key&page=1&pe...
seems to show gnutls (in fips140 drbg code), stoken, qemu, rdup, filezilla, pike, cmake, uanytun, haskell-bindings-nettle, libarchive, anytun, and mosh.
That seems to be quite a popular API and removing it would break those projects. Why not keep it as backwards compatible and mark it as deprecated with a macro (copied from gnutls):
#ifdef __GNUC__ # define _GNUTLS_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
# if _GNUTLS_GCC_VERSION >= 30100 # define _GNUTLS_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) # endif #endif
#ifndef _GNUTLS_GCC_ATTR_DEPRECATED #define _GNUTLS_GCC_ATTR_DEPRECATED #endif ?
regards, Nikos