Skip to content

Commit 0d5c7a5

Browse files
committed
windows-check: Link ws2_32 and crypt32 for the mingw-regress wolfssh build
config.log from a failing run showed the wolfCrypt_Init AC_CHECK_LIB probe pulling in ssl.c/internal.c/wolfio.c from the static libwolfssl.a, leaving Winsock (socket, send, recv, inet_pton, ...) and cert store (CertOpenSystemStoreA, ...) symbols unresolved. A shared build would defer that resolution to the DLL; the static archive here needs ws2_32 and crypt32 passed explicitly via LIBS.
1 parent 84098bf commit 0d5c7a5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/windows-check.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,13 @@ jobs:
288288
# autogen.sh exports WARNINGS="all,error", turning autotools warnings
289289
# into errors that the MSYS2 automake can trip on.
290290
autoreconf -ivf
291+
# wolfssl is a static archive here, so its Windows socket (ws2_32) and
292+
# certificate store (crypt32) references are only resolved when this
293+
# configure's own AC_CHECK_LIB and later link steps pull them in too.
291294
./configure --enable-sftp \
292295
CPPFLAGS="-I$HOME/wolfssl-install/include" \
293-
LDFLAGS="-L$HOME/wolfssl-install/lib"
296+
LDFLAGS="-L$HOME/wolfssl-install/lib" \
297+
LIBS="-lws2_32 -lcrypt32"
294298
make -j$(nproc) tests/regress.test tests/unit.test
295299
./tests/regress.test
296300
./tests/unit.test

0 commit comments

Comments
 (0)