Source: chiark-tcl
Version: 1.3.7
Severity: normal
Hello,
chiark-tcl FTBFS against nettle 4.0 with:
x86_64-linux-gnu-gcc -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror
-O2 -Wno-pointer-sign -fno-strict-aliasing -fPIC -I../hbytes/
-I/usr/include/tcl8.6 -I../base -DTCL_MEM_DEBUG -MMD -o algtables.o -c
algtables.c
algtables.c:23:10: fatal error: nettle/sha.h: No such file or directory
23 | #include <nettle/sha.h>
| ^~~~~~~~~~~~~~
compilation terminated.
moving to the non-legacy headers (sha1.h, sha2.h) yields:
algtables.c:75:18: error: too many arguments to function
'nettle_sha3_224_diges'; expected 2, have 3
75 | DO("sha3-224", sha3_224, SHA3_224) \
nettle 4.0 is available in experimental (nettle4-dev). This is a API
breaking release, see the NEWS file.
| The most disruptive API change is that the *_digest functions
| no longer takes the desired digest size as argument. Truncated
| hashes appeared to be an important use case decades ago when
| the previous interface was designed, but that is now rather
| obscure.
nettle3 compat can be kept with #ifdefs e.g. (ocserv):
+#include <nettle/version.h>
[...]
+ #if NETTLE_VERSION_MAJOR >= 4
+ sha1_digest(&ctx, output);
+#else
sha1_digest(&ctx, 20, output);
+#endif
cu Andreas