Commit 0d4a8cc9ba for strongswan.org

commit 0d4a8cc9ba359d8982d08989e1d01c8a32379935
Author: Tobias Brunner <tobias@strongswan.org>
Date:   Fri Apr 10 11:21:00 2026 +0200

    appveyor: Reduce build time and remove build against OpenSSL 1.1.0

    We are still too close to the limit of 1 hour (at least with the 2019
    image and the 2022 image is about the same), so reduce the build time by
    not building libimcv natively, which saves about 10 minutes.

    Also, only build against OpenSSL 1.0.2 (on the 2017 image) and 1.1.1 (on
    the 2019 image) as these are the only versions for which OpenSSL provides
    extended support.

diff --git a/.appveyor.yml b/.appveyor.yml
index 0ff94fc83c..39fee26428 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -1,7 +1,6 @@
 clone_depth: 50

 image:
-  - Visual Studio 2015
   - Visual Studio 2017
   - Visual Studio 2019

@@ -26,11 +25,12 @@ install:
   - |
       set IMG=%APPVEYOR_BUILD_WORKER_IMAGE:~-4%
       set OPENSSL=OpenSSL
-      IF "%IMG%" == "2017" set OPENSSL=OpenSSL-v11
       set OPENSSL_DIR=/c/%OPENSSL%-%TEST%
       C:\%OPENSSL%-%TEST%\bin\openssl.exe version -a
   # lld doesn't read .lib files
-  - IF NOT "%IMG%" == "2015" copy C:\%OPENSSL%-%TEST%\lib\libcrypto.lib C:\%OPENSSL%-%TEST%\lib\libcrypto.dll.a
+  - IF "%IMG%" == "2019" copy C:\%OPENSSL%-%TEST%\lib\libcrypto.lib C:\%OPENSSL%-%TEST%\lib\libcrypto.dll.a
+  # make sure we have lld installed
+  - IF "%IMG%" == "2019" %MSYS_SH% --login -c ". /etc/profile && pacman --noconfirm -S --needed mingw-w64-x86_64-lld"
   # newer versions of msys2 don't provide autotools or gperf via base-devel anymore
   - IF "%IMG%" == "2019" %MSYS_SH% --login -c ". /etc/profile && pacman --noconfirm -S --needed autotools gperf"

diff --git a/scripts/test.sh b/scripts/test.sh
index a766e46fc4..05c6f4f021 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -342,19 +342,21 @@ win*)
 			--enable-eap-tnc --enable-eap-ttls --enable-eap-identity
 			--enable-eap-radius
 			--enable-updown --enable-ext-auth --enable-libipsec --enable-pkcs11
-			--enable-tnccs-20 --enable-imc-attestation --enable-imv-attestation
-			--enable-imc-os --enable-imv-os --enable-tnc-imv --enable-tnc-imc
+			--enable-tnccs-20
 			--enable-pki --enable-swanctl --enable-socket-win
 			--enable-kernel-iph --enable-kernel-wfp --enable-winhttp"
-	# no make check for Windows binaries unless we run on a windows host
+	# no make check for Windows binaries unless we run on a Windows host
+	# building natively is slow, so don't build libimcv to save about 10 minutes
 	if test "$APPVEYOR" != "True"; then
 		TARGET=
+		CONFIG="$CONFIG --enable-imc-attestation --enable-imv-attestation
+				--enable-imc-os --enable-imv-os --enable-tnc-imv --enable-tnc-imc"
 	else
 		CONFIG="$CONFIG --enable-openssl"
 		CFLAGS="$CFLAGS -I$OPENSSL_DIR/include"
 		LDFLAGS="-L$OPENSSL_DIR/lib -fuse-ld=lld"
 		case "$IMG" in
-		2015)
+		2017)
 			# gcc/ld might be too old to find libeay32 via .lib instead of .dll
 			LDFLAGS="-L$OPENSSL_DIR"
 			;;
@@ -534,6 +536,7 @@ if [ ! -f ./configure ]; then
 fi

 cd $BUILD_DIR
+echo "$ LDFLAGS=\"$LDFLAGS\""
 echo "$ CC=$CC CFLAGS=\"$CFLAGS\" ./configure $CONFIG"
 CC="$CC" CFLAGS="$CFLAGS" $SRC_DIR/configure $CONFIG || exit $?