Skip to content

src,doc: clarify OpenSSL FIPS configuration and fix crypto.setFips(0) throw - #64982

Open
panva wants to merge 4 commits into
nodejs:mainfrom
panva:openssl-fips-docs
Open

src,doc: clarify OpenSSL FIPS configuration and fix crypto.setFips(0) throw#64982
panva wants to merge 4 commits into
nodejs:mainfrom
panva:openssl-fips-docs

Conversation

@panva

@panva panva commented Aug 3, 2026

Copy link
Copy Markdown
Member

This extracts and expands the non-breaking FIPS documentation corrections and crypto.setFips(0) fix from #64777.

Clarify how Node.js FIPS controls interact with the OpenSSL 3 provider model. crypto.setFips(true) only adds fips=yes to the default property query, while crypto.getFips() only reports that query state. Neither establishes provider readiness.

Document provider installation and startup configuration, configuration precedence, startup validation with --enable-fips and --force-fips, runtime-control limitations, OpenSSL 1.1.1 requirements, and the multiple-libcrypto provider limitation. Correct --openssl-conf to --openssl-config, remove the nonexistent ./configure --openssl-fips
instruction, and regenerate the manpage.

panva added 4 commits August 3, 2026 17:42
OpenSSL reports FIPS mode as disabled after a successful
EVP_default_properties_enable_fips(..., 0) call. Do not treat that
disabled state as a failure.

Add OpenSSL 3 regression coverage that verifies the state is enabled
before disabling it again.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
A missing OPENSSL_VERSION_NUMBER macro raises TypeError while the
configure logic attempts to slice None. Treat that like the other
version detection failures so configure warns and records version 0.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
openssl_is_fips is always the string "true" or "false", so testing
whether it is non-empty always adds OPENSSL_FIPS to mkssldef. Add the
define only when FIPS was requested.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Distinguish OpenSSL 3 provider setup from FIPS/property-query state,
document configuration precedence and provider limitations, and retain
the OpenSSL 1.1 and runtime control guidance.

Regenerate the CLI manpage.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
@panva
panva requested a review from richardlau August 3, 2026 17:06
@panva panva added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Aug 3, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/build
  • @nodejs/crypto
  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. dependencies Pull requests that update a dependency file. doc Issues and PRs related to the documentations. needs-ci PRs that need a full CI run. labels Aug 3, 2026
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.27%. Comparing base (a937758) to head (c903e66).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64982      +/-   ##
==========================================
- Coverage   90.28%   90.27%   -0.01%     
==========================================
  Files         762      762              
  Lines      247524   247524              
  Branches    46684    46683       -1     
==========================================
- Hits       223466   223463       -3     
- Misses      15490    15491       +1     
- Partials     8568     8570       +2     

see 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. dependencies Pull requests that update a dependency file. doc Issues and PRs related to the documentations. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants