feat(openssl): split FIPS provider into separate package#17698
Draft
tobiasb-ms wants to merge 1 commit into
Draft
feat(openssl): split FIPS provider into separate package#17698tobiasb-ms wants to merge 1 commit into
tobiasb-ms wants to merge 1 commit into
Conversation
2262b0a to
59cc7f8
Compare
Extract the FIPS provider module (fips.so) from the openssl package into
a new openssl-fips-provider package, using the upstream fipsinstall
approach for integrity verification instead of embedded HMAC.
== New package: openssl-fips-provider ==
Built from the same openssl source with enable-fips. Ships:
- /usr/lib64/ossl-modules/fips.so
- /etc/pki/tls/fipsmodule.cnf (generated by fipsinstall post-strip)
- /etc/pki/tls/openssl.d/openssl-fips-provider.cnf (drop-in config)
The drop-in registers the fips provider in [provider_sect] and includes
fipsmodule.cnf, making the provider loadable via 'openssl ... -provider
fips' without requiring kernel FIPS mode.
== Changes to openssl ==
- Remove enable-fips from ./Configure (fips.so no longer built here)
- Drop patch 0018 (re-enables fipsinstall subcommand)
- Replace patch 0019 with simplified version: kernel FIPS mode just
activates fips+base providers and sets FIPS properties, relying on
the drop-in for config rather than loading fips_local.cnf directly
- Replace patch 0037 with rebased version (context conflict with 0018
removal in doc/man5/fips_config.pod)
- Remove fips_local.cnf (no longer needed; drop-in provides config)
- Remove %{SOURCE1} hmac-ify call in %check (no fips.so to process)
- Keep Requires: openssl-fips-provider on openssl-libs
All other FIPS patches remain — they modify libcrypto/libssl runtime
behavior for loading and activating an external FIPS provider.
== Patch differences between openssl and openssl-fips-provider ==
Both packages share the same upstream source and nearly all patches.
Differences:
Dropped from both:
- 0018 (FIPS-disable-fipsinstall): re-enable fipsinstall subcommand
Dropped only from openssl-fips-provider:
- 0020 (FIPS-INTEG-CHECK-Embed-hmac-in-fips.so): embedded HMAC
integrity check, replaced by fipsinstall/fipsmodule.cnf approach
- 0022 (FIPS-INTEG-CHECK-Execute-KATS-before-HMAC): KAT reordering
for embedded HMAC verification, irrelevant without 0020
- 0053 (Allow-hybrid-MLKEM-in-FIPS-mode): touches defltprov.c and
libcrypto internals only — not compiled into fips.so
Patches 0020/0022 remain in openssl because the patched files
(providers/fips/self_test.c) exist in the source tree but are not
compiled without enable-fips — they are inert and removing them would
add overlay complexity for no functional benefit. Patch 0053 is
guarded by a %{defined azurelinux} conditional in openssl only.
Identical in both (same file content):
- 0019 (FIPS-Force-fips-provider-on): simplified to just activate
providers in kernel FIPS mode, drop fips_local.cnf loading
- 0037 (FIPS-TLS-Enforce-EMS): rebased fips_config.pod hunk against
full upstream file (old version depended on 0018's gutting)
These patches modify code in libcrypto/libssl (not fips.so), so their
content is functionally irrelevant to the fips-provider build — they
just need to apply cleanly. Unified to reduce maintenance surface.
== Config model ==
- openssl.d drop-in: makes provider loadable (registers fips_sect,
includes MAC data from fipsmodule.cnf)
- Patch 0019: auto-activates fips+base in kernel FIPS mode
- Crypto-policies: NOT included in drop-in (activation via
update-crypto-policies is a separate concern)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
59cc7f8 to
3988b08
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract the FIPS provider module (fips.so) from the openssl package into a new openssl-fips-provider package, using the upstream fipsinstall approach for integrity verification instead of embedded HMAC.
AB#21687
New package: openssl-fips-provider
Built from the same openssl source with
enable-fips. Ships:/usr/lib64/ossl-modules/fips.so/etc/pki/tls/fipsmodule.cnf(generated by fipsinstall post-strip)/etc/pki/tls/openssl.d/openssl-fips-provider.cnf(drop-in config)The drop-in registers the fips provider in
[provider_sect]and includesfipsmodule.cnf, making the provider loadable viaopenssl ... -provider fipswithout requiring kernel FIPS mode.Changes to openssl
enable-fipsfrom./Configure(fips.so no longer built here)fipsinstallsubcommand)fips_local.cnfdirectlydoc/man5/fips_config.pod)fips_local.cnf(no longer needed; drop-in provides config)%check(no fips.so to process)Requires: openssl-fips-provideronopenssl-libsConfig model
fips_sect, includes MAC data fromfipsmodule.cnf)update-crypto-policiesis a separate concern)Patch differences between openssl and openssl-fips-provider
Both packages share the same upstream source and nearly all patches.
Dropped from both:
Dropped only from openssl-fips-provider:
defltprov.cand libcrypto internals only — not compiled into fips.soPatches 0020/0022 remain in openssl because the patched files (
providers/fips/self_test.c) exist in the source tree but are not compiled withoutenable-fips— they are inert and removing them would add overlay complexity for no functional benefit. Patch 0053 is guarded by a%{defined azurelinux}conditional in openssl only.Identical in both (same file content):
fips_local.cnfloadingfips_config.podhunk against full upstream file (old version depended on 0018's gutting)These patches modify code in libcrypto/libssl (not fips.so), so their content is functionally irrelevant to the fips-provider build — they just need to apply cleanly. Unified to reduce maintenance surface.