summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2019-09-23 21:05:48 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2019-09-23 21:05:51 +0200
commit9b43ce3ac6e087515c5e22e4f346db67e0a01de7 (patch)
tree5fec98ecdae503e19a2ba38375d23a0ed51a3b61
parent54315879b33b45668860e406241aa04286044673 (diff)
downloadgnutls-9b43ce3ac6e087515c5e22e4f346db67e0a01de7.tar.gz
nettle: use nettle_get_secpp* consistently
We already depend on nettle 3.4.1 which provides that symbol, ensure that we use it consistently. Relates: #835 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--configure.ac2
-rw-r--r--lib/nettle/pk.c10
2 files changed, 1 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 71e655771d..72eee10d58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -562,7 +562,7 @@ AC_ARG_ENABLE(non-suiteb-curves,
if test "$enable_non_suiteb" = "yes";then
dnl nettle_secp_192r1 is not really a function
- AC_CHECK_LIB(hogweed, nettle_secp_192r1, enable_non_suiteb=yes, enable_non_suiteb=no, [$HOGWEED_LIBS $NETTLE_LIBS])
+ AC_CHECK_LIB(hogweed, nettle_get_secp_192r1, enable_non_suiteb=yes, enable_non_suiteb=no, [$HOGWEED_LIBS $NETTLE_LIBS])
if test "$enable_non_suiteb" = "yes";then
AC_DEFINE([ENABLE_NON_SUITEB_CURVES], 1, [Enable all curves])
diff --git a/lib/nettle/pk.c b/lib/nettle/pk.c
index b2d27cf74a..b65b1b2465 100644
--- a/lib/nettle/pk.c
+++ b/lib/nettle/pk.c
@@ -1327,16 +1327,6 @@ _wrap_nettle_pk_verify(gnutls_pk_algorithm_t algo,
return ret;
}
-#if !defined(NETTLE_VERSION_MAJOR) || (NETTLE_VERSION_MAJOR < 3 || (NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4))
-# ifdef ENABLE_NON_SUITEB_CURVES
-# define nettle_get_secp_192r1() &nettle_secp_192r1
-# define nettle_get_secp_224r1() &nettle_secp_224r1
-# endif
-# define nettle_get_secp_256r1() &nettle_secp_256r1
-# define nettle_get_secp_384r1() &nettle_secp_384r1
-# define nettle_get_secp_521r1() &nettle_secp_521r1
-#endif
-
static inline const struct ecc_curve *get_supported_nist_curve(int curve)
{
switch (curve) {