summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-09 08:24:59 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-16 09:39:52 +0200
commitd2e49df8ebc1b3a7e3a28059c099174365e0a546 (patch)
tree6078fd18d2ac02783e64ed0f93cacedf883dc327 /configure.ac
parent11196e76849d671284936540f063846aeab21604 (diff)
downloadgnutls-d2e49df8ebc1b3a7e3a28059c099174365e0a546.tar.gz
fuzzer: added a fuzzer target
This allows to compile the library with flags which will add predictable random generation and eliminate some crypto checks, in order for the library to be used for testing (fuzzying). Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index bce0d9f7ab..4ae4c0bc4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,6 +248,14 @@ AC_ARG_ENABLE(tests,
enable_tests=$enableval, enable_tests=$enable_tools)
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
+AC_ARG_ENABLE(fuzzer-target,
+ AS_HELP_STRING([--enable-fuzzer-target], [make a library intended for testing - not production]),
+ enable_fuzzer_target=$enableval, enable_fuzzer_target=no)
+AM_CONDITIONAL(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION, test "$enable_fuzzer_target" != "no")
+if test "$enable_fuzzer_target" != "no";then
+ AC_DEFINE([FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION], 1, [Enable fuzzer target -not for production])
+fi
+
GTK_DOC_CHECK(1.1)
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19])
@@ -1043,3 +1051,9 @@ AC_MSG_WARN([[
*** applications to link, do not enable static linking.
]])
fi
+
+if test "$enable_fuzzer_target" != "no";then
+AC_MSG_WARN([[
+*** This version of the library is for fuzzying purposes and is intentionally broken!
+]])
+fi