Skip to content

Commit 021a00c

Browse files
committed
FEATURE-ci-v3-runtime-green: link Windows public audit clients to Winsock
1 parent b8edaeb commit 021a00c

4 files changed

Lines changed: 26 additions & 6 deletions

File tree

‎ChangeLog‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
Version 3.0.0 - 2026-10-10
2+
Link the installed public TLS and HTTP/2 audit clients to Winsock on
3+
Windows and name their executables with the platform suffix.
24
Resolve the Windows version-information system import in installed
35
package dependency audits.
46
Keep the HTTP/1 connection watchdog armed at a pending server drain

‎scripts/check-v3-public-http2.py‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,23 @@ def run(args):
146146
flags = ['--libs'] + (['--static'] if linkage == 'static' else [])
147147
libraries = shlex.split(command(['pkg-config'] + flags + ['libhttpserver'], consumer, env))
148148
if linkage == 'static': libraries = [str(prefix / 'lib/libhttpserver.a') if f == '-lhttpserver' else f for f in libraries]
149-
libraries += ['-pthread', '-Wl,-rpath,' + str(prefix / 'lib'), '-Wl,-rpath,' + str(provider / 'lib')] + shlex.split(args.sanitize)
150-
executable = consumer / linkage
149+
# Winsock is a system library on Windows and lives in libc on the
150+
# POSIX targets, whose runtime search needs the explicit rpath.
151+
if os.name == 'nt':
152+
libraries += ['-lws2_32', '-lmswsock', '-lbcrypt']
153+
else:
154+
libraries += ['-pthread', '-Wl,-rpath,' + str(prefix / 'lib'), '-Wl,-rpath,' + str(provider / 'lib')]
155+
libraries += shlex.split(args.sanitize)
156+
suffix = '.exe' if os.name == 'nt' else ''
157+
executable = consumer / (linkage + suffix)
151158
provenance = compile_probe(args.compiler, [consumer / 'http2_consumer.cpp'], cflags + shlex.split(args.sanitize),
152159
libraries, executable, command, env, source, build, prefix, False)
153160
validate_public(True, provenance['dependencies'], prefix, source, build)
154161
graph = audit.dependency_graph([str(executable)]); check_linkage(graph, linkage, prefix)
155162
violations = audit.graph_violations(graph, 'strict', args.tls, 'aggregate', audit.load_policy(), provider)
156163
require(not violations, 'dependency audit: ' + repr(violations))
157164
if args.tls == 'yes':
158-
example = consumer / (linkage + '-example')
165+
example = consumer / (linkage + '-example' + suffix)
159166
example_compile = compile_probe(args.compiler, [consumer / 'http2.cpp'], cflags + shlex.split(args.sanitize),
160167
libraries, example, command, env, source, build, prefix, False)
161168
example_graph = audit.dependency_graph([str(example)]); check_linkage(example_graph, linkage, prefix)

‎scripts/check-v3-public-tls.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,17 +330,21 @@ def run(args):
330330
if identity == 'client-valid':
331331
chain += (fixtures / 'client-intermediate.pem').read_bytes()
332332
(fixtures / (identity + '-chain.pem')).write_bytes(chain)
333-
independent = consumer / 'independent-client'
333+
independent = consumer / ('independent-client' + ('.exe' if os.name == 'nt' else ''))
334+
# tls_client.cpp dials raw sockets: Winsock is a system library on
335+
# Windows and lives in libc on the POSIX targets.
336+
independent_system = ['-lws2_32'] if os.name == 'nt' else []
334337
command_log([args.compiler, '-std=c++20', '-I' + str(args.provider_prefix / 'include'),
335338
consumer / 'tls_client.cpp', '-L' + str(args.provider_prefix / 'lib'),
336-
'-Wl,-rpath,' + str(args.provider_prefix / 'lib'), '-lssl', '-lcrypto', '-o', independent], consumer, env)
339+
'-Wl,-rpath,' + str(args.provider_prefix / 'lib'), '-lssl', '-lcrypto']
340+
+ independent_system + ['-o', independent], consumer, env)
337341
receipt['independent_client'] = dict(executable=str(independent),
338342
sha256=hashlib.sha256(independent.read_bytes()).hexdigest(), dependencies=audit.dependency_graph([str(independent)]))
339343
check('libhttpserver' not in json.dumps(receipt['independent_client']['dependencies']), 'client links server library')
340344
command_log([independent, 'fixtures', fixtures], consumer, env, timeout=10)
341345
(fixtures / 'malformed.pem').write_text('malformed certificate')
342346
(fixtures / 'malformed-key.pem').write_text('malformed private key')
343-
command_log([args.provider_prefix / 'bin/openssl', 'pkey', '-in', fixtures / 'acme-key.pem', '-aes-256-cbc', '-passout', 'pass:task194-test-only', '-out', fixtures / 'encrypted-key.pem'], consumer, env)
347+
command_log([args.provider_prefix / 'bin' / ('openssl.exe' if os.name == 'nt' else 'openssl'), 'pkey', '-in', fixtures / 'acme-key.pem', '-aes-256-cbc', '-passout', 'pass:task194-test-only', '-out', fixtures / 'encrypted-key.pem'], consumer, env)
344348
(fixtures / 'extra.pem').write_bytes((fixtures / 'acme.pem').read_bytes() * 2)
345349
for name in ('mismatch-key', 'past-expiry', 'late-expiry'):
346350
shutil.copyfile(fixtures / 'acme.pem', fixtures / (name + '.pem'))

‎specs/tasks/FEATURE-ci-v3-runtime-green.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,10 @@ Full local `make check -j1` (TLS=no, g++ 15.2, WSL2): 232/235 pass, 2 platform s
156156
- [x] Verified against the real MSYS2 mingw64 packages (python 3.14.9-1, openssl 3.6.5-1, libgcc 16.2.0-6, winpthreads, libstdc++): after adding `version.dll` to `WINDOWS_SYSTEM`, the full `_ssl` client closure resolves -- remaining names are WINDOWS_SYSTEM entries or MSYS2 runtime DLLs that the same run's own recorded suite graphs already resolve through `V3_PACKAGE_DLL_DIRS`. The mingw-built integration closures (from the run's suites.json) import only allowlisted system DLLs.
157157
- [x] One-line allowlist addition in `scripts/audit-v3-installed-package.py`; `version.dll` is a documented System32 component (version-information APIs). `test-v3-installed-package.py` 60/60; `test-v3-installed-consumer.py` 97/97 (one unrelated compile-timing flake on the first local run, clean on rerun).
158158
- [ ] Full mingw64 CI evidence past the client audit.
159+
160+
## Stage 10: Windows public audit client linkage (2026-10-30)
161+
162+
- [x] Evidence: the 2026-10-30 mingw64 package job (124062430922) and the Windows acceptance job (124062636691) both advanced past every earlier gate (installed suites, traffic cells, compiled operations and the Python TLS client audit of stage 9) and failed at the same place: linking the independent TLS client in `check-v3-public-tls.py`, with `undefined reference to __imp_WSAStartup/__imp_socket/__imp_htons/__imp_htonl/__imp_connect/__imp_closesocket` (tls_client.cpp already carries its own `_WIN32` Winsock path; only the link line lacked the system library).
163+
- [x] Repair in `scripts/check-v3-public-tls.py`: the independent client is named with the platform `.exe` suffix and linked with `-lws2_32` on `os.name == 'nt'` (POSIX targets unchanged), and the provider `openssl` tool is invoked with its explicit `.exe` name on Windows, matching `run-v3-release-ci.py`.
164+
- [x] Same-class parity repair in `scripts/check-v3-public-http2.py` (preemptive, code-audit driven, not yet exercised on Windows): consumers and examples get the `.exe` suffix and the `ws2_32/mswsock/bcrypt` system libraries replace the POSIX-only `-pthread`/`-rpath` line, matching the `check-v3-installed-consumer.py`/`check-v3-public-tls.py` convention; runtime DLL resolution stays on the `runtime_environment` PATH/V3_PACKAGE_DLL_DIRS mechanism. Local gates: `test-v3-public-http2.py` 6/6, `py_compile` on both scripts.
165+
- [ ] Full mingw64/Windows CI evidence past the public TLS client link.

0 commit comments

Comments
 (0)