]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Mangle/hide GNUTLS-built nettle_rsa_compute_root_tr()
authorAlyssa Ross <hi@alyssa.is>
Mon, 25 Mar 2024 10:17:29 +0000 (10:17 +0000)
committerAlyssa Ross <hi@alyssa.is>
Wed, 27 Mar 2024 13:33:24 +0000 (14:33 +0100)
Since bfb326f6e ("nettle: plumb RSA-OAEP in the Nettle crypto backend"),
building gnutls statically fails due to a duplicate definition of
nettle_rsa_compute_root_tr (which comes from "rsa_compute_root_tr" being
replaced by a preprocessor macro).

This patch fixes this by renaming the GNUTLS version by redefining the
value of the rsa_compute_root_tr macro.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
devel/import-from-nettle.sh

index 38c3dfffb5ad139fc4f06c7c5432bf2bd628ac93..90a07200d619709f17311b8671d06073bd6c93e8 100755 (executable)
@@ -108,6 +108,15 @@ for f in $IMPORTS; do
        sed \
          -e '/^#include <nettle\/nettle-types\.h>/a\
 #include "block8.h"
+' \
+         $dst > $dst-t && mv $dst-t $dst
+       ;;
+    esac
+    case $dst in
+      */rsa-sign-tr.c)
+       sed \
+         -e '/^#include <nettle\/rsa\.h>/i\
+#define nettle_rsa_compute_root_tr _gnutls_nettle_backport_rsa_compute_root_tr\
 ' \
          $dst > $dst-t && mv $dst-t $dst
        ;;