aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/engine/gnump/gnump_pk.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/gnump/gnump_pk.cpp b/src/engine/gnump/gnump_pk.cpp
index f26500dd5..3ca1f25ff 100644
--- a/src/engine/gnump/gnump_pk.cpp
+++ b/src/engine/gnump/gnump_pk.cpp
@@ -9,6 +9,12 @@
#include <botan/internal/gmp_wrap.h>
#include <gmp.h>
+/* GnuMP 5.0 and later have a side-channel resistent powm */
+#if defined(HAVE_MPZ_POWM_SEC)
+ #undef mpz_powm
+ #define mpz_powm mpz_powm_sec
+#endif
+
#if defined(BOTAN_HAS_RSA)
#include <botan/rsa.h>
#endif