From 0a1c40b36508b7848c0359bd5f5297b5e0e0c2d3 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Wed, 11 Feb 2026 15:20:31 +0000 Subject: [PATCH] Don't allow `--enable-selftest` with empty file It probably won't compile anyway. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index ed7a512a47..c0592812c9 100644 --- a/configure.ac +++ b/configure.ac @@ -6602,6 +6602,9 @@ AS_CASE([$ENABLED_SELFTEST], SELFTEST_VERSION="v1" ]) +AS_IF([test "x$ENABLED_SELFTEST" = "xyes" && test ! -s "${srcdir}/wolfcrypt/src/selftest.c"], + [AC_MSG_ERROR([selftest.c is missing, --enable-selftest requires the CAVP selftest source])]) + AS_CASE([$SELFTEST_VERSION], ["v2"],[ AM_CFLAGS="$AM_CFLAGS -DHAVE_SELFTEST -DHAVE_SELFTEST_VERSION=2 -DHAVE_PUBLIC_FFDHE"