aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-03-30 19:26:40 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-03-30 19:26:40 +0200
commitca4c9eae269c34765df26699fe756860c7827693 (patch)
tree3e3a70fc3294bc6b62b4f9d099d5cbcabf25c3ee
parentd8b32bc60d26a8a30b71530af0bd3e9e037e073b (diff)
downloadgnunet-ca4c9eae269c34765df26699fe756860c7827693.tar.gz
gnunet-ca4c9eae269c34765df26699fe756860c7827693.zip
UTIL/SCALARPRODUCT: Do not build ECC dlog or scalarproduct with incompatible libgcrypt versions (>=1.9.0)
-rw-r--r--configure.ac12
-rw-r--r--po/POTFILES.in3
-rw-r--r--src/Makefile.am6
-rw-r--r--src/util/Makefile.am18
4 files changed, 33 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 28c616069..f72039d09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -416,8 +416,16 @@ gcrypt=0
416NEED_LIBGCRYPT_API=1 416NEED_LIBGCRYPT_API=1
417NEED_LIBGCRYPT_VERSION=1.6.0 417NEED_LIBGCRYPT_VERSION=1.6.0
418 418
419 419# Check if we have libgcrypt >= 1.9. Some things do not work with it
420AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION", gcrypt=1) 420gcrypt19=0
421AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:1.9.0",
422 [AC_MSG_WARN(["Some subsystems do not work with gcrypt >=1.9.0"])
423 gcrypt=1
424 gcrypt19=1],
425 [AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION", gcrypt=1)]
426)
427AM_CONDITIONAL(HAVE_NOLIBGCRYPT19,
428 [test "$gcrypt19" = 0])
421AC_CHECK_DECLS([gcry_mpi_set_opaque_copy], [], [], [[#include <gcrypt.h>]]) 429AC_CHECK_DECLS([gcry_mpi_set_opaque_copy], [], [], [[#include <gcrypt.h>]])
422 430
423AS_IF([test $gcrypt = 0], 431AS_IF([test $gcrypt = 0],
diff --git a/po/POTFILES.in b/po/POTFILES.in
index dbbb68bcc..b3849abbd 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -407,6 +407,9 @@ src/testbed/gnunet_mpi_test.c
407src/testbed/gnunet_testbed_mpi_spawn.c 407src/testbed/gnunet_testbed_mpi_spawn.c
408src/testbed/testbed_api.c 408src/testbed/testbed_api.c
409src/testbed/testbed_api_barriers.c 409src/testbed/testbed_api_barriers.c
410src/testbed/testbed_api_cmd_controller.c
411src/testbed/testbed_api_cmd_peer.c
412src/testbed/testbed_api_cmd_service.c
410src/testbed/testbed_api_hosts.c 413src/testbed/testbed_api_hosts.c
411src/testbed/testbed_api_operations.c 414src/testbed/testbed_api_operations.c
412src/testbed/testbed_api_peers.c 415src/testbed/testbed_api_peers.c
diff --git a/src/Makefile.am b/src/Makefile.am
index d8a869acb..564923e28 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -45,6 +45,10 @@ if HAVE_POSTGRESQL
45 POSTGRES_DIR = pq 45 POSTGRES_DIR = pq
46endif 46endif
47 47
48if HAVE_NOLIBGCRYPT19
49 SCALARPRODUCT_DIR = scalarproduct
50endif
51
48REST_DIR = rest 52REST_DIR = rest
49 53
50 54
@@ -93,7 +97,7 @@ SUBDIRS = \
93 seti \ 97 seti \
94 setu \ 98 setu \
95 consensus \ 99 consensus \
96 scalarproduct \ 100 $(SCALARPRODUCT_DIR) \
97 revocation \ 101 revocation \
98 vpn \ 102 vpn \
99 gns \ 103 gns \
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 6b9e083a7..e2614e5e3 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -25,6 +25,11 @@ if ENABLE_BENCHMARK
25 PTHREAD = -lpthread 25 PTHREAD = -lpthread
26endif 26endif
27 27
28if HAVE_NOLIBGCRYPT19
29 DLOG = crypto_ecc_dlog.c
30 DLOG_TEST = test_crypto_ecc_dlog
31endif
32
28gnunet_config_diff_SOURCES = \ 33gnunet_config_diff_SOURCES = \
29 gnunet-config-diff.c 34 gnunet-config-diff.c
30gnunet_config_diff_LDADD = \ 35gnunet_config_diff_LDADD = \
@@ -58,7 +63,7 @@ libgnunetutil_la_SOURCES = \
58 crypto_symmetric.c \ 63 crypto_symmetric.c \
59 crypto_crc.c \ 64 crypto_crc.c \
60 crypto_ecc.c \ 65 crypto_ecc.c \
61 crypto_ecc_dlog.c \ 66 $(DLOG) \
62 crypto_ecc_setup.c \ 67 crypto_ecc_setup.c \
63 crypto_hash.c \ 68 crypto_hash.c \
64 crypto_hash_file.c \ 69 crypto_hash_file.c \
@@ -248,7 +253,6 @@ libgnunet_plugin_test_la_LDFLAGS = \
248if HAVE_BENCHMARKS 253if HAVE_BENCHMARKS
249 BENCHMARKS = \ 254 BENCHMARKS = \
250 perf_crypto_hash \ 255 perf_crypto_hash \
251 perf_crypto_ecc_dlog \
252 perf_crypto_rsa \ 256 perf_crypto_rsa \
253 perf_crypto_paillier \ 257 perf_crypto_paillier \
254 perf_crypto_symmetric \ 258 perf_crypto_symmetric \
@@ -256,6 +260,10 @@ if HAVE_BENCHMARKS
256 perf_malloc \ 260 perf_malloc \
257 perf_mq \ 261 perf_mq \
258 perf_scheduler 262 perf_scheduler
263
264if HAVE_NOLIBGCRYPT19
265 BENCHMARKS += perf_crypto_ecc_dlog
266endif
259endif 267endif
260 268
261if HAVE_SSH_KEY 269if HAVE_SSH_KEY
@@ -287,7 +295,7 @@ check_PROGRAMS = \
287 test_crypto_ecdhe \ 295 test_crypto_ecdhe \
288 test_crypto_ecdh_eddsa \ 296 test_crypto_ecdh_eddsa \
289 test_crypto_ecdh_ecdsa \ 297 test_crypto_ecdh_ecdsa \
290 test_crypto_ecc_dlog \ 298 $(DLOG_TEST) \
291 test_crypto_hash \ 299 test_crypto_hash \
292 test_crypto_hash_context \ 300 test_crypto_hash_context \
293 test_crypto_hkdf \ 301 test_crypto_hkdf \
@@ -448,11 +456,13 @@ test_crypto_eddsa_LDADD = \
448 libgnunetutil.la \ 456 libgnunetutil.la \
449 $(LIBGCRYPT_LIBS) 457 $(LIBGCRYPT_LIBS)
450 458
459if HAVE_NOLIBGCRYPT19
451test_crypto_ecc_dlog_SOURCES = \ 460test_crypto_ecc_dlog_SOURCES = \
452 test_crypto_ecc_dlog.c 461 test_crypto_ecc_dlog.c
453test_crypto_ecc_dlog_LDADD = \ 462test_crypto_ecc_dlog_LDADD = \
454 libgnunetutil.la \ 463 libgnunetutil.la \
455 $(LIBGCRYPT_LIBS) 464 $(LIBGCRYPT_LIBS)
465endif
456 466
457test_crypto_ecdhe_SOURCES = \ 467test_crypto_ecdhe_SOURCES = \
458 test_crypto_ecdhe.c 468 test_crypto_ecdhe.c
@@ -595,11 +605,13 @@ perf_crypto_hash_SOURCES = \
595perf_crypto_hash_LDADD = \ 605perf_crypto_hash_LDADD = \
596 libgnunetutil.la 606 libgnunetutil.la
597 607
608if HAVE_NOLIBGCRYPT19
598perf_crypto_ecc_dlog_SOURCES = \ 609perf_crypto_ecc_dlog_SOURCES = \
599 perf_crypto_ecc_dlog.c 610 perf_crypto_ecc_dlog.c
600perf_crypto_ecc_dlog_LDADD = \ 611perf_crypto_ecc_dlog_LDADD = \
601 libgnunetutil.la \ 612 libgnunetutil.la \
602 -lgcrypt 613 -lgcrypt
614endif
603 615
604perf_crypto_rsa_SOURCES = \ 616perf_crypto_rsa_SOURCES = \
605 perf_crypto_rsa.c 617 perf_crypto_rsa.c