summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2020-04-26 19:27:05 +0200
committerDaiki Ueno <ueno@gnu.org>2020-05-04 14:26:39 +0200
commitdda0d7717f648c155b6f94610aafa591a7d5ade2 (patch)
treef33935caaee282968bd9113d2b550eb629144741 /devel
parenta8493e2f024f25c36d519347dec71c2998a479b2 (diff)
downloadgnutls-dda0d7717f648c155b6f94610aafa591a7d5ade2.tar.gz
nettle: vendor in SIV-CMAC implementation
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/import-from-nettle.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/devel/import-from-nettle.sh b/devel/import-from-nettle.sh
index c0de610fd6..3867f9e2a7 100755
--- a/devel/import-from-nettle.sh
+++ b/devel/import-from-nettle.sh
@@ -32,6 +32,10 @@ xts.c
xts.h
xts-aes128.c
xts-aes256.c
+siv-cmac.c
+siv-cmac.h
+siv-cmac-aes128.c
+siv-cmac-aes256.c
"
PUBLIC="
@@ -96,7 +100,7 @@ for f in $IMPORTS; do
;;
esac
case $dst in
- */cfb.c | */cmac.c | */xts.c)
+ */cfb.c | */cmac.c | */xts.c | */siv-cmac.c)
sed \
-e 's/"nettle-internal\.h"/"nettle-alloca.h"/' \
$dst > $dst-t && mv $dst-t $dst
@@ -111,6 +115,20 @@ for f in $IMPORTS; do
$dst > $dst-t && mv $dst-t $dst
;;
esac
+ case $dst in
+ */siv-cmac*.[ch])
+ sed \
+ -e '/^#include "cmac\.h"/ { i\
+#ifdef HAVE_NETTLE_CMAC128_UPDATE\
+#include <nettle/cmac.h>\
+#else\
+#include "cmac.h"\
+#endif
+; d
+}' \
+ $dst > $dst-t && mv $dst-t $dst
+ ;;
+ esac
else
echo "Error: $src not found" 1>&2
exit 1