Skip to content

Build Windows release dependencies from source - #527

Merged
mtrojnar merged 1 commit into
masterfrom
ci/windows-release-openssl-from-source
Nov 5, 2026
Merged

mtrojnar merged 1 commit into
masterfrom
ci/windows-release-openssl-from-source

Conversation

@mtrojnar

@mtrojnar mtrojnar commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Problem

The Windows release binaries take OpenSSL from vcpkg's pinned baseline, which ships OpenSSL 3.1.2. The 3.1 series reached end of life in March 2025. Updating the baseline wouldn't help: vcpkg's newest OpenSSL, 3.6.5, went out of support on 1 November 2026, and its 3.5 LTS builds stop at 3.5.4.

Fix

  • Build OpenSSL 3.5.9 from source, as the macOS job does since Build macOS release dependencies for macOS 14 #523, along with zlib 1.3.2. Both use the static runtime (/MT). Both tarballs, and the NASM used for the x64 assembly, are pinned by SHA-256. arm64 uses the same VC-WIN64-CLANGASM-ARM target as vcpkg.
  • Keep OpenSSL's default prefix under C:\Program Files and stage the installation with DESTDIR. OpenSSL compiles the prefix in as the directory it searches for engines and providers, so it must not be somewhere unprivileged users can write.
  • Clear the VCPKG_ROOT that msvc-dev-cmd sets, so CMakeLists.txt doesn't load the vcpkg toolchain.
  • Fail the build if the binary needs a C runtime or OpenSSL DLL, or doesn't report the pinned OpenSSL.

The libraries are cached per MSVC toolset. A cold build adds about 8–10 minutes per job.

Validation

I ran the workflow via workflow_dispatch from a temporary branch with only the Windows jobs enabled (42080500269). Both architectures linked OpenSSL 3.5.9 and zlib 1.3.2, depend only on system DLLs, and passed all 391 tests. The legacy provider is compiled in, so the tests printed no "Unable to load provider: legacy" warnings.

The Windows release jobs took OpenSSL and zlib from vcpkg's pinned
baseline, which ships OpenSSL 3.1.2. The 3.1 series reached end of life
in March 2025. Updating the baseline would not help: vcpkg's newest
OpenSSL, 3.6.5, went out of support on 1 November 2026, and its 3.5 LTS
builds stop at 3.5.4.

Build OpenSSL 3.5.9, as the macOS job does, and zlib 1.3.2 from source
with the static runtime, pinning both and NASM by SHA-256. Keep
OpenSSL's default prefix under Program Files and stage the installation
with DESTDIR: the prefix is compiled in as the engine and provider
search path, so it must not be a directory that unprivileged users can
create.

Clear the VCPKG_ROOT set by msvc-dev-cmd, so CMakeLists.txt does not
load the vcpkg toolchain, and verify that the binary depends on no
runtime or third-party DLLs and uses the pinned OpenSSL.
@mtrojnar
mtrojnar merged commit 3331336 into master Nov 5, 2026
10 checks passed
@mtrojnar
mtrojnar deleted the ci/windows-release-openssl-from-source branch November 5, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant