Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup! crypto: add FIPS indicator diagnostics channel
  • Loading branch information
panva committed Aug 29, 2026
commit 077a0472dc913da34acd43162049cf8dd2a77457
2 changes: 1 addition & 1 deletion doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -4562,6 +4562,7 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
[V8 Inspector integration for Node.js]: debugger.md#v8-inspector-integration-for-nodejs
[V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
[`"type"`]: packages.md#type
[`'crypto.fips.indicator'`]: diagnostics_channel.md#event-cryptofipsindicator
[`--allow-addons`]: #--allow-addons
[`--allow-child-process`]: #--allow-child-process
[`--allow-fs-read`]: #--allow-fs-read
Expand All @@ -4575,7 +4576,6 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
[`--diagnostic-dir`]: #--diagnostic-dirdirectory
[`--disable-sigusr1`]: #--disable-sigusr1
[`--enable-fips`]: #--enable-fips
[`'crypto.fips.indicator'`]: diagnostics_channel.md#event-cryptofipsindicator
[`--env-file-if-exists`]: #--env-file-if-existsfile
[`--env-file`]: #--env-filefile
[`--experimental-sea-config`]: single-executable-applications.md#1-generating-single-executable-preparation-blobs
Expand Down
2 changes: 1 addition & 1 deletion doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -7620,8 +7620,8 @@ See the [list of SSL OP Flags][] for details.
[XTS mode]: #xts-mode
[`'crypto.fips.indicator'`]: diagnostics_channel.md#event-cryptofipsindicator
[`--allow-openssl-store`]: cli.md#--allow-openssl-store
[`--enable-fips`]: cli.md#--enable-fips
[`--enable-fips-indicator-events`]: cli.md#--enable-fips-indicator-events
[`--enable-fips`]: cli.md#--enable-fips
[`--force-fips`]: cli.md#--force-fips
[`--openssl-config`]: cli.md#--openssl-configfile
[`--openssl-shared-config`]: cli.md#--openssl-shared-config
Expand Down
2 changes: 1 addition & 1 deletion src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "node_sea.h"
#include "uv.h"
#if HAVE_OPENSSL
#include "openssl/opensslv.h"
#include "ncrypto.h" // Defines OPENSSL_VERSION_PREREQ for BoringSSL.
#include "quic/guard.h"
#endif

Expand Down
12 changes: 10 additions & 2 deletions test/parallel/test-diagnostics-channel-crypto-fips-indicator.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
'use strict';

// Flags: --enable-fips-indicator-events

const common = require('../common');

if (!common.hasCrypto) {
common.skip('missing crypto');
}

const assert = require('node:assert');
const { spawnSync } = require('node:child_process');
const diagnosticsChannel = require('node:diagnostics_channel');
const { once } = require('node:events');
const { Worker } = require('node:worker_threads');
Expand All @@ -26,6 +25,15 @@ if (!hasOpenSSL(3, 4)) {
common.skip('OpenSSL 3.4 or later is required');
} else if (!hasFIPS(3, 4)) {
common.skip('an active OpenSSL 3.4+ FIPS provider is required');
} else if (!process.execArgv.includes('--enable-fips-indicator-events')) {
const child = spawnSync(
process.execPath,
['--enable-fips-indicator-events', __filename],
{ encoding: 'utf8' });
assert.strictEqual(
child.status,
0,
`stdout: ${child.stdout}\nstderr: ${child.stderr}`);
Comment thread
panva marked this conversation as resolved.
Resolved
} else {
run().then(common.mustCall());
}
Expand Down
Loading