summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Lhomme <robux4@ycbcr.xyz>2020-07-15 09:34:19 +0200
committerDaiki Ueno <ueno@gnu.org>2020-08-31 08:13:45 +0200
commit04f26dd85ebe76c4a47afdf169ede4cc8f042e6d (patch)
tree6e11984d737439f34aeba798f74c3b58599601c1
parentb4bfe1a8684015d4a24a29c5d713157044971d0a (diff)
downloadgnutls-04f26dd85ebe76c4a47afdf169ede4cc8f042e6d.tar.gz
mangle gnutls-built ecc_scalar_random
GNUTLS builds ecc-random.c but ecc_scalar_random() is a public API. So we mangle the internal version we build. ecc_mod_random is unaffected as it's an internal API that is mangled by GNUTLS. Fixes #1016 Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
-rwxr-xr-xdevel/import-ecc-from-nettle.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/devel/import-ecc-from-nettle.sh b/devel/import-ecc-from-nettle.sh
index da121786dd..2ce6285d39 100755
--- a/devel/import-ecc-from-nettle.sh
+++ b/devel/import-ecc-from-nettle.sh
@@ -202,7 +202,13 @@ for f in $IMPORTS; do
;;
*/ecc-random.c )
sed \
- -e 's/"nettle-internal\.h"/"nettle-alloca.h"/' \
+ -e '/^#include "nettle-internal\.h"/ { i\
+#include "nettle-alloca.h"\
+\
+void gnutls_ecc_scalar_random(struct ecc_scalar *, void *, nettle_random_func *);
+; d
+}' \
+ -e 's/ecc_scalar_random/gnutls_ecc_scalar_random/' \
-e 's/^ & (mpn_sub_n/ \& (int)(mpn_sub_n/' \
$dst > $dst-t && mv $dst-t $dst
;;