Skip to content

add openssl fips provider#17341

Draft
tobiasb-ms wants to merge 2 commits into
4.0from
tobiasb-ms/openssl-fips-provider
Draft

add openssl fips provider#17341
tobiasb-ms wants to merge 2 commits into
4.0from
tobiasb-ms/openssl-fips-provider

Conversation

@tobiasb-ms
Copy link
Copy Markdown
Contributor

This change adds the FIPS provider for openssl. Modeled after RHEL, it is built in a separate component -- openssl-fips-provider so we can pin it separately from the main openssl component. This is important because once certified, we will almost never want to rev openssl-fips-provider. openssl then takes a run-time dependency on openssl-fips-provider, so it should always have the FIPS provider available.

That said, openssl-fips-provider is still based on the same source -- the openssl upstream. It builds very similarly to openssl, but then instead of deleting the fips-related things it deletes everything else.

We diverged significantly from RHEL on how to implement the FIPS provider -- going way, way closer to an unmodified openssl version. Our patches are now almost all outside of the FIPS boundary, and we package it the way openssl wants it packaged -- with the HMAC in a config file rather than embedded.

I've build and run these locally and everything behaves the same as Fedora. I've also built on the build server.

tobiasb-ms and others added 2 commits May 18, 2026 20:15
New package that builds fips.so and fipsmodule.cnf from OpenSSL 3.5.4 using
the upstream fipsinstall approach (not Red Hat's embedded HMAC).

Key design decisions:
- Builds with enable-fips, runs fipsinstall AFTER debuginfo strip
- Removes Patch0018/0020/0022 (RH embedded HMAC approach)
- Keeps Patch0017 rebranded for Azure Linux
- Ships only fips.so and fipsmodule.cnf (all other files cleaned)
- fipsmodule.cnf has activate=1 stripped so the provider is loadable
  but not auto-activated by default
- Published to rpm-base (not rpm-sdk)
- Requires: openssl-libs (runtime)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Modify the openssl component to work with the standalone
openssl-fips-provider package:

- Remove patches 0017, 0018, 0020, 0022 (RH embedded HMAC approach)
- Replace hmacify with fipsinstall in %check
- Rebrand FIPS vendor string to Azure Linux
- Replace fips_local.cnf symlink with real file that .includes both
  fipsmodule.cnf (HMAC data) and crypto-policies backend
- Wire fipsmodule.cnf and fips_sect into openssl.cnf so -provider fips
  works without manual config editing (provider registered but not
  auto-activated)
- Fix Patch0037 (fips_config.pod hunk doesn't apply to 3.5.4)
- Suppress openssl-libs -> openssl-fips-provider Requires (temporary,
  until dependency resolver is happy)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

🔒❌ Lock files are out of date

FIX: — run this and commit the result:

azldev component update -p openssl

Or download the fix patch and apply it:

gh run download 26063932482 -R microsoft/azurelinux -n locks-patch
git apply locks.patch

Changed components (1)

Component New upstream commit
openssl 0990e54a2f6b6b8e4f3e238175382505fff8be51

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