English | 中文
Automated Windows builds for OpenSSL using local PowerShell scripts and GitHub Actions.
- Build OpenSSL locally with a single command.
- Check the latest upstream OpenSSL release every day with GitHub Actions.
- Build only when a matching release or tag does not already exist.
- Publish x64/x86 shared and static ZIP packages to GitHub Releases.
Local builds require Windows, a Visual Studio C++ toolchain, Strawberry Perl, and NASM.
Install Visual Studio 2026 or Build Tools for Visual Studio 2026, then enable:
Desktop development with C++- MSVC C++ build tools
- Windows 10/11 SDK
The scripts use vswhere.exe to locate the latest Visual Studio C++ toolchain and then call vcvarsall.bat, so you do not need to manually open a Developer Command Prompt.
If Visual Studio 2022 is still installed, the scripts can continue to work with it. When Visual Studio 2026 is available, it is preferred automatically.
Download and install Strawberry Perl:
https://strawberryperl.com/
Or install it with Chocolatey:
choco install strawberryperl -yInstall NASM with Chocolatey:
choco install nasm -yAfter installation, reopen PowerShell and verify Perl and NASM:
perl -v
nasm -vBuild the latest OpenSSL release for x64 shared libraries:
.\scripts\Invoke-OpenSslBuild.ps1Build a specific version:
.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0Build both x64 and x86:
.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0 -Targets "x64,x86"Build static libraries only:
.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0 -Targets x64 -Linkage staticBuild both shared and static libraries:
.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0 -Targets "x64,x86" -Linkage bothInstall to dist without creating ZIP packages:
.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0 -Targets x64 -Linkage shared -NoPackageDefault output directories:
- Source archives and extracted source:
build - Installed OpenSSL files:
dist - ZIP packages:
packages
Generated package names look like this:
openssl-4.0.0-windows-x64-shared.zip
openssl-4.0.0-windows-x64-static.zip
openssl-4.0.0-windows-x86-shared.zip
openssl-4.0.0-windows-x86-static.zip
scripts/Get-LatestOpenSslVersion.ps1: resolves the latest stable OpenSSL release from GitHub Releases.scripts/Test-OpenSslReleaseExists.ps1: checks whether this repository already has a matchingopenssl-x.y.zrelease or tag.scripts/New-OpenSslBuildMatrix.ps1: creates the GitHub Actions build matrix.scripts/Build-OpenSslWindows.ps1: builds one architecture and one linkage type.scripts/Invoke-OpenSslBuild.ps1: local entry point for building multiple architectures and linkage types.
The workflow is located at:
.github/workflows/build-openssl-windows.yml
The scheduled workflow runs once per week. It checks the latest stable OpenSSL release from upstream first. If this repository already has a matching openssl-x.y.z release or tag, the build is skipped.
Cloud builds use the GitHub-hosted windows-2025-vs2026 runner, which provides Windows Server 2025 with the Visual Studio 2026 image.
You can also run the workflow manually from the GitHub Actions page. Available inputs:
openssl_version: OpenSSL version to build. Leave empty to build the latest stable release.targets:x64,x86, or multiple values separated by commas, such asx64,x86.linkage:shared,static, orboth.upload_release: whether to upload packages to a GitHub Release.
Pushing an openssl-* tag also triggers a build:
git tag openssl-4.0.0
git push origin openssl-4.0.0Tag-triggered builds automatically upload ZIP packages to the matching GitHub Release.