[gnutls-devel] GnuTLS | Mangle/hide GNUTLS-built nettle_rsa_compute_root_tr() (!1826)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Mar 25 23:38:12 CET 2024




Daiki Ueno started a new discussion on devel/import-from-nettle.sh: https://gitlab.com/gnutls/gnutls/-/merge_requests/1826#note_1831007443

>  	  $dst > $dst-t && mv $dst-t $dst
>  	;;
>      esac
> +    case $dst in
> +      */rsa-sign-tr.c)
> +	sed \
> +	  -e '/^#include <nettle\/rsa\.h>/a\
> +int\
> +gnutls_rsa_compute_root_tr(const struct rsa_public_key *pub,\
> +                    const struct rsa_private_key *key,\
> +                    void *random_ctx, nettle_random_func *random,\
> +                    mpz_t x, const mpz_t m);\
> +' \
> +	  -e 's/rsa_compute_root_tr/gnutls_rsa_compute_root_tr/' \
> +	  $dst > $dst-t && mv $dst-t $dst

Thank you for the MR. I wonder if this could be achieved by simply redefining the `rsa_compute_root_tr` macro as follows?

```suggestion:-9+0
	sed \
	  -e '/^#include <nettle\/rsa\.h>/a\
#undef rsa_compute_root_tr\
#define rsa_compute_root_tr _gnutls_nettle_rsa_compute_root_tr\
' \
	  $dst > $dst-t && mv $dst-t $dst
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1826#note_1831007443
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20240325/34039d70/attachment-0001.html>


More information about the Gnutls-devel mailing list