Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 8 additions & 28 deletions .github/workflows/test-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ permissions:
contents: read

env:
# The NIST-validated FIPS module is built once per architecture from this ref
# and shared by every installer flavor of that architecture via the `fips`
# job's artifact.
FIPS_REF: openssl-3.1.2
# The NIST-validated FIPS module (FIPS 140-3 certificate #5586) is built once
# per architecture from this ref and shared by every installer flavor of that
# architecture via the `fips` job's artifact.
FIPS_REF: openssl-3.5.9

# Visual Studio Enterprise and Perl are preinstalled on the hosted Windows
# runners, but the VS version and path differ between images (VS 2026 under
Expand Down Expand Up @@ -116,18 +116,6 @@ jobs:
path: openssl-fips
persist-credentials: false

- name: Apply Windows build patches to FIPS source
if: steps.fips_cache.outputs.cache-hit != 'true' && env.FIPS_REF == 'openssl-3.1.2'
shell: pwsh
working-directory: openssl-fips
run: |
git apply --verbose "$env:GITHUB_WORKSPACE\windows-installer\0001-win-Fix-warning-build-issue.patch"
if ($LASTEXITCODE -ne 0) { throw "patch 0001 failed" }
git apply --verbose "$env:GITHUB_WORKSPACE\windows-installer\0002-windows-makefile-libdir-absolute.patch"
if ($LASTEXITCODE -ne 0) { throw "patch 0002 failed" }
git apply --verbose "$env:GITHUB_WORKSPACE\windows-installer\0001-3.1-Windows-Use-Z7-compiler-flag-to-enable-parallel-.patch"
if ($LASTEXITCODE -ne 0) { throw "jom patch failed" }

- name: Locate Visual Studio
if: steps.fips_cache.outputs.cache-hit != 'true'
shell: pwsh
Expand Down Expand Up @@ -156,25 +144,17 @@ jobs:
Start-Process -FilePath ".\$installer" -ArgumentList '/S' -Wait
"C:\Program Files\NASM" | Out-File -FilePath "$env:GITHUB_PATH" -Append

- name: install jom
if: steps.fips_cache.outputs.cache-hit != 'true'
shell: pwsh
run: |
mkdir C:\jom
Invoke-WebRequest -Uri "https://openssl-library.org/ci-deps/jom-1.1.7.exe" -OutFile C:\jom\jom.exe
$expected = (Get-Content "$env:GITHUB_WORKSPACE\.github\ci-deps.json" -Raw | ConvertFrom-Json).'jom-1.1.7.exe'
$actual = (Get-FileHash C:\jom\jom.exe -Algorithm SHA256).Hash
if ($actual -ne $expected) { throw "SHA256 mismatch for jom.exe (expected $expected, got $actual)" }
"C:\jom" | Out-File -FilePath "$env:GITHUB_PATH" -Append

# Built unpatched with nmake, as the release pipeline does. jom is not
# safe here: 3.5 still compiles with /Zi into shared .pdb files, and the
# result is cached per FIPS_REF, so the serial build runs once.
- name: Build FIPS module (${{ matrix.target }})
if: steps.fips_cache.outputs.cache-hit != 'true'
shell: cmd
working-directory: openssl-fips
run: |
call "%VCVARS%"
perl Configure ${{ matrix.target }} enable-fips no-makedepend
jom /j4 /S
nmake /S

- name: Save FIPS build cache
if: steps.fips_cache.outputs.cache-hit != 'true' && inputs.pr == ''
Expand Down
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Patch files must remain byte-identical for `git apply`, so skip whitespace
# and EOF-fixing hooks against them.
exclude: '^windows-installer/.*\.patch$'

repos:
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.16.0
Expand Down
4 changes: 2 additions & 2 deletions tests/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# in .github/workflows/test-installer.yml.

fips:
# The current validated module
validated_versions: "3.1.2"
# The current validated module (FIPS 140-3 certificate #5586)
validated_versions: "3.5.9"

paths:
# x64 and arm64 packages
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def repair(info: InstallerInfo) -> None:

def supported_fips_type(info: InstallerInfo) -> str:
"""The FIPS module type a flavor offers: VS installers default to the
validated 3.1.2 module; hybrid installers only offer the current-version
validated module; hybrid installers only offer the current-version
module (commit 63b0a77 disabled the validated option there, because the
validated module is VC-WIN64A and would drag the VC++ runtime into an
otherwise-HybridCRT install)."""
Expand Down
10 changes: 5 additions & 5 deletions tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def test_fips_requires_app(wizard: Wizard) -> None:

@pytest.mark.skipif(os.getenv("CI") == "true", reason="GUI tests require interactive session")
def test_fips_module_type_selector_matches_flavor(wizard: Wizard, installer: InstallerInfo) -> None:
"""The FIPS module-type selector (validated 3.1.2 vs current) is offered
"""The FIPS module-type selector (validated vs current) is offered
only by the VS installers. Hybrid installers hide it and silently force the
'current' module (commit 63b0a77): the validated module is VC-WIN64A and
would drag the VC++ runtime into an otherwise-HybridCRT install.
Expand All @@ -321,7 +321,7 @@ def test_fips_module_type_selector_matches_flavor(wizard: Wizard, installer: Ins
dlg = _click_and_advance(dlg, app) # components → additional options
assert _current_static(dlg) == "Options to install"

# The "Validated module (3.1.2)" radio button; present+visible only on VS.
# The "Validated module (<version>)" radio button; present+visible only on VS.
validated = dlg.child_window(title_re="(?i).*validated.*")
shown = validated.exists(timeout=5) and validated.is_visible()
if installer.flavor == "hybrid":
Expand All @@ -339,8 +339,8 @@ def test_full_ui_install(wizard: Wizard, installer: InstallerInfo, install_dir:

The FIPS module type follows what each flavor offers in the UI: the hybrid
installer has only the checkbox (module forced to the current version — the
validated 3.1.2 option is hidden, commit 63b0a77), while the VS installer
also shows the validated/current radio, where we pick the validated 3.1.2
validated option is hidden, commit 63b0a77), while the VS installer
also shows the validated/current radio, where we pick the validated
module.

Completion is detected by polling the registry (openssl_product_installed),
Expand All @@ -365,7 +365,7 @@ def test_full_ui_install(wizard: Wizard, installer: InstallerInfo, install_dir:

if installer.flavor == "vs":
# VS shows the module-type radio (enabled once FIPS is checked);
# select the validated 3.1.2 module.
# select the validated module.
time.sleep(0.5) # let the radio group enable after checking FIPS
dlg.child_window(title_re="(?i).*validated.*").click()
expected_fips = config["fips"]["validated_versions"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_signed.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def installed_artifact(installer: InstallerInfo) -> Iterator[None]:
binary the product can ship — then uninstall at session end. Used by tests
that walk the install dir.

The FIPS module type follows the flavor: VS lays down the validated 3.1.2
The FIPS module type follows the flavor: VS lays down the validated
module, hybrid the current one. The validated module ships in the hybrid
installer too but isn't installed on the supported path; it's the same
VC-WIN64A binary the VS run already signature-checks, so nothing is lost."""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_silent_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
from conftest import VS_BUILD_NAMES


# The validated FIPS module (3.1.2) is only offered by the VS installers.
# The validated FIPS module is only offered by the VS installers.
# Commit 63b0a77 removed the option from the hybrid installers' UI because the
# validated module is VC-WIN64A (it would pull the VC++ runtime into an
# otherwise-HybridCRT install, deviating from the module's Security Policy).
_HYBRID_VALIDATED_SKIP = (
"validated 3.1.2 FIPS module is not offered in hybrid installers "
"validated FIPS module is not offered in hybrid installers "
"(commit 63b0a77 hides the UI option); see test_fips_validated_option_disabled_in_hybrid"
)

Expand Down

This file was deleted.

28 changes: 0 additions & 28 deletions windows-installer/0001-win-Fix-warning-build-issue.patch

This file was deleted.

39 changes: 0 additions & 39 deletions windows-installer/0002-windows-makefile-libdir-absolute.patch

This file was deleted.

1 change: 1 addition & 0 deletions windows-installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ For HybridCRT flavour to work on older versions than Windows 10, the Universal C
* **FIPS provider**
* Optionally installs the FIPS provider.
You can choose either the FIPS-validated OpenSSL FIPS provider version or the provider that comes with the current library version.
The FIPS-validated version is 3.5.9 ([FIPS 140-3 certificate #5586](https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/5586)).
The FIPS provider cannot be installed without the application (`openssl.exe`), as the application is required to generate the `fipsmodule.cnf` file.

For the Hybrid CRT variant, only the FIPS provider of the current OpenSSL library version is available (there is no FIPS-validated version).
Expand Down
8 changes: 1 addition & 7 deletions windows-installer/installer_automatization.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (-not $opensslInstallVersionBranch) {
$versionBranch = $opensslInstallVersionBranch
}
if (-not $opensslInstallFipsVersionBranch) {
$fipsVersionBranch = "openssl-3.1.2"
$fipsVersionBranch = "openssl-3.5.9"
} else {
$fipsVersionBranch = $opensslInstallFipsVersionBranch
}
Expand Down Expand Up @@ -33,12 +33,6 @@ function Build-Openssl {
)
git clone --depth 1 -b $branch $gitUrl $dir
pushd $dir
# 3.1.2 does not build on windows without this patch
# TODO patches do not apply probably because of win style new line
if ($branch -eq "openssl-3.1.2") {
git apply "$PSScriptRoot\0001-win-Fix-warning-build-issue.patch"
git apply "$PSScriptRoot\0002-windows-makefile-libdir-absolute.patch"
}
cmd /c '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" && perl .\Configure enable-fips $extra_config_options VC-WIN64A'
cmd /c '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" && nmake'
if ($branch -ne $fipsVersionBranch) {
Expand Down
2 changes: 1 addition & 1 deletion windows-installer/openssl.aip
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@
<COMPONENT cid="caphyon.advinst.msicomp.MsiRadioButtonComponent">
<ROW Property="AI_UPGRADE" Order="1" Value="Yes" X="0" Y="0" Width="250" Height="15" Text="[AI_Upgrade_Question_Yes]" TextStyle="[ManufacturerFont]" TextLocId="-" MsiKey="AI_UPGRADE#1"/>
<ROW Property="AI_UPGRADE" Order="2" Value="No" X="0" Y="18" Width="250" Height="15" Text="[AI_Upgrade_Question_No]" TextStyle="[ManufacturerFont]" TextLocId="-" MsiKey="AI_UPGRADE#2"/>
<ROW Property="INSTALL_FIPS_TYPE" Order="1" Value="validated" X="0" Y="0" Width="210" Height="23" Text="Validated module (3.1.2)"/>
<ROW Property="INSTALL_FIPS_TYPE" Order="1" Value="validated" X="0" Y="0" Width="210" Height="23" Text="Validated module (3.5.9)"/>
<ROW Property="INSTALL_FIPS_TYPE" Order="2" Value="current" X="0" Y="18" Width="210" Height="23" Text="Current version ([ProductVersion])"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiRegLocatorComponent">
Expand Down
Loading