summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2022-01-16 16:48:14 +0000
committerDaiki Ueno <ueno@gnu.org>2022-01-16 16:48:14 +0000
commit0a673a028506c6bff961c41992fb25baa1a11509 (patch)
treef68b4d6970db214e4caf7cc5cdea8f72a11cb4a4
parent6000b2d93b6cb9acd45adc9b4d8f7bf2f1cb49b2 (diff)
parent1b06c7fef0cea21e4f7094f89cd2649c55361413 (diff)
downloadgnutls-0a673a028506c6bff961c41992fb25baa1a11509.tar.gz
Merge branch 'wip/dueno/build-fixes3' into 'master'
Minor build fixes for 3.7.3 release (part 2) See merge request gnutls/gnutls!1516
-rw-r--r--.gitignore3
-rw-r--r--.x-sc_makefile_at_at_check1
-rw-r--r--configure.ac3
-rw-r--r--lib/Makefile.am6
-rw-r--r--lib/common.mk4
-rw-r--r--lib/x509/Makefile.am2
-rw-r--r--src/Makefile.am7
-rw-r--r--tests/dtls/dtls-stress.c4
-rw-r--r--tests/mini-dtls-record.c1
9 files changed, 22 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index dd1373a57d..2465946e72 100644
--- a/.gitignore
+++ b/.gitignore
@@ -271,6 +271,7 @@ Makefile.user
*.o
*.out
*.plist
+python/__pycache__/
src/benchmark
src/benchmark-cipher
src/benchmark-tls
@@ -624,6 +625,7 @@ tests/priority-set
tests/priority-set2
tests/privkey-keygen
tests/privkey-verify-broken
+tests/protocol-set-allowlist
tests/psk-file
tests/pskself
tests/pskself2
@@ -784,6 +786,7 @@ tests/suite/testpkcs11.debug
tests/suite/testtpm.sh
tests/suite/tlslite
tests/suite/x509paths/X509tests
+tests/system-override-curves-allowlist
tests/system-override-hash
tests/system-override-sig
tests/system-override-sig-tls
diff --git a/.x-sc_makefile_at_at_check b/.x-sc_makefile_at_at_check
new file mode 100644
index 0000000000..ead7fb054c
--- /dev/null
+++ b/.x-sc_makefile_at_at_check
@@ -0,0 +1 @@
+^lib/common.mk
diff --git a/configure.ac b/configure.ac
index 26c890e2c5..a4f8c183ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,9 @@ AX_CODE_COVERAGE
AM_MAINTAINER_MODE([enable])
+AM_MISSING_PROG([GPERF], [gperf])
+AM_MISSING_PROG([ASN1PARSER], [asn1Parser])
+
AC_ARG_ENABLE(bash-tests,
AS_HELP_STRING([--disable-bash-tests], [skip some tests that badly need bash]),
enable_bash_tests=$enableval, enable_bash_tests=yes)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 50cd3dbf7c..35df35ee8d 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -259,12 +259,12 @@ libgnutlsxx_la_LIBADD = libgnutls.la
endif
pkix_asn1_tab.c: $(srcdir)/pkix.asn
- -asn1Parser $(srcdir)/pkix.asn pkix_asn1_tab.c
+ $(AM_V_GEN)$(ASN1PARSER) $(srcdir)/pkix.asn pkix_asn1_tab.c
gnutls_asn1_tab.c: $(srcdir)/gnutls.asn
- -asn1Parser $(srcdir)/gnutls.asn gnutls_asn1_tab.c
+ $(AM_V_GEN)$(ASN1PARSER) $(srcdir)/gnutls.asn gnutls_asn1_tab.c
priority_options.h: $(srcdir)/priority_options.gperf
- -gperf --global-table -t $^ > $@-tmp \
+ $(V_GPERF)$(GPERF) --global-table -t $^ > $@-tmp \
&& sed 's/^const struct priority_options_st \*/static const struct priority_options_st \*/' <$@-tmp >$@ \
&& rm -f $@-tmp
diff --git a/lib/common.mk b/lib/common.mk
index 6a1b7855d6..796fdf30bd 100644
--- a/lib/common.mk
+++ b/lib/common.mk
@@ -1,3 +1,7 @@
AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS) \
$(LIBTASN1_CFLAGS) $(LIBIDN2_CFLAGS) $(P11_KIT_CFLAGS) $(CODE_COVERAGE_CFLAGS)
COMMON_LINK_FLAGS = $(CODE_COVERAGE_LDFLAGS)
+
+V_GPERF = $(V_GPERF_@AM_V@)
+V_GPERF_ = $(V_GPERF_@AM_DEFAULT_V@)
+V_GPERF_0 = @echo " GPERF " $@;
diff --git a/lib/x509/Makefile.am b/lib/x509/Makefile.am
index 63b2b849b4..5caf8f87f9 100644
--- a/lib/x509/Makefile.am
+++ b/lib/x509/Makefile.am
@@ -86,6 +86,6 @@ libgnutls_x509_la_SOURCES += ocsp.c ocsp_output.c
endif
supported_exts.h: $(srcdir)/supported_exts.gperf
- -gperf --global-table -t $^ > $@-tmp \
+ $(V_GPERF)$(GPERF) --global-table -t $^ > $@-tmp \
&& sed 's/^const struct supported_exts_st \*/static const struct supported_exts_st \*/' <$@-tmp >$@ \
&& rm -f $@-tmp
diff --git a/src/Makefile.am b/src/Makefile.am
index d867b02013..dabc97c0a4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -68,8 +68,6 @@ if ENABLE_DANE
bin_PROGRAMS += danetool
endif
-noinst_PROGRAMS = systemkey
-
if ENABLE_PKCS11
# TPM makes use of PKCS #11 callbacks
@@ -81,7 +79,7 @@ bin_PROGRAMS += p11tool
endif
noinst_LTLIBRARIES =
-
+noinst_PROGRAMS =
if ENABLE_SRP
srptool_SOURCES = srptool.c
@@ -216,6 +214,7 @@ libcmd_tpmtool_la_LIBADD += $(LTLIBREADLINE) $(INET_PTON_LIB) $(LIB_CLOCK_GETTIM
endif # ENABLE_TROUSERS
+noinst_PROGRAMS += systemkey
systemkey_SOURCES = systemkey.c certtool-common.c common.c
systemkey_LDADD = ../lib/libgnutls.la
systemkey_LDADD += libcmd-systemkey.la ../gl/libgnu.la gl/libgnu_gpl.la
@@ -230,7 +229,7 @@ noinst_LTLIBRARIES += libcerttool-cfg.la
libcerttool_cfg_la_SOURCES = certtool-cfg.h certtool-cfg.c cfg.c cfg.h
libcerttool_cfg_la_LIBADD = ../gl/libgnu.la gl/libgnu_gpl.la
-noinst_PROGRAMS = dumpcfg
+noinst_PROGRAMS += dumpcfg
dumpcfg_SOURCES = cfg.c cfg.h
dumpcfg_CFLAGS = -DTEST=1
dumpcfg_LDADD = ../gl/libgnu.la gl/libgnu_gpl.la
diff --git a/tests/dtls/dtls-stress.c b/tests/dtls/dtls-stress.c
index 01e5ecad68..826bd29414 100644
--- a/tests/dtls/dtls-stress.c
+++ b/tests/dtls/dtls-stress.c
@@ -564,12 +564,14 @@ static void filter_permute_state_run(filter_permute_state_t * state,
gnutls_transport_ptr_t fd,
const unsigned char *buffer, size_t len)
{
- unsigned char *data = malloc(len);
+ unsigned char *data;
int packet = state->order[state->count];
if (debug > 2)
log("running permutation for %s/%d/%d\n", state->name, packetCount, state->count);
+ data = malloc(len);
+ assert(data);
memcpy(data, buffer, len);
state->packets[packet].data = data;
state->packets[packet].size = len;
diff --git a/tests/mini-dtls-record.c b/tests/mini-dtls-record.c
index bcda720391..83d4900706 100644
--- a/tests/mini-dtls-record.c
+++ b/tests/mini-dtls-record.c
@@ -111,6 +111,7 @@ static ssize_t odd_push(gnutls_transport_ptr_t tr, const void *data, size_t len)
}
stored_messages[current] = malloc(len);
+ assert(stored_messages[current]);
memcpy(stored_messages[current], data, len);
stored_sizes[current] = len;