From 39a474f7c09b07f606c92284ece158e7b4990077 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Tue, 28 Jan 2025 15:54:50 +0000 Subject: [PATCH] crypto: added support for reading certificates from macOS system store PR-URL: https://github.com/nodejs/node/pull/56599 Reviewed-By: James M Snell Reviewed-By: Joyee Cheung --- doc/api/cli.md | 8 + doc/api/tls.md | 3 + node.gypi | 5 +- src/crypto/crypto_context.cc | 320 +++++++++++++++++- src/node_options.cc | 4 + src/node_options.h | 1 + test/parallel/parallel.status | 3 + test/parallel/test-cli-node-options.js | 3 + test/parallel/test-cli-node-print-help.js | 2 +- test/parallel/test-native-certs-macos.mjs | 47 +++ ...rocess-env-allowed-flags-are-documented.js | 1 + 11 files changed, 388 insertions(+), 9 deletions(-) create mode 100644 test/parallel/test-native-certs-macos.mjs diff --git a/doc/api/cli.md b/doc/api/cli.md index d07c2a728d77e1..1eea671f631741 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -2833,6 +2833,13 @@ The following values are valid for `mode`: * `silent`: If supported by the OS, mapping will be attempted. Failure to map will be ignored and will not be reported. +### `--use-system-ca` + +Node.js uses the trusted CA certificates present in the system store along with +the `--use-bundled-ca`, `--use-openssl-ca` options. + +This option is available to macOS only. + ### `--v8-options`