Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support NODE_EXTRA_CA_CERTS #41689

Merged
merged 7 commits into from
Apr 10, 2024

Update environment-variables.md

6bbcfe0
Select commit
Loading
Failed to load commit list.
Merged

feat: support NODE_EXTRA_CA_CERTS #41689

Update environment-variables.md
6bbcfe0
Select commit
Loading
Failed to load commit list.
trop / Backportable? - 28-x-y completed Apr 10, 2024 in 9h 36m 26s

Backport Failed

This PR was checked and could not be automatically backported to "28-x-y" cleanly

Details

Failed Diff:

diff --cc script/node-disabled-tests.json
index e08f101e47,b05bff18e0..0000000000
--- a/script/node-disabled-tests.json
+++ b/script/node-disabled-tests.json
@@@ -50,9 -59,9 +50,13 @@@
    "parallel/test-snapshot-umd",
    "parallel/test-snapshot-warning",
    "parallel/test-snapshot-weak-reference",
 -  "parallel/test-snapshot-worker",
    "parallel/test-strace-openat-openssl",
++<<<<<<< HEAD
 +  "parallel/test-tls-cert-chains-concat",
 +  "parallel/test-tls-cert-chains-in-ca",
++=======
+   "parallel/test-tls-alpn-server-client",
++>>>>>>> feat: support `NODE_EXTRA_CA_CERTS`
    "parallel/test-tls-cli-max-version-1.2",
    "parallel/test-tls-cli-max-version-1.3",
    "parallel/test-tls-cli-min-version-1.1",
diff --cc shell/common/node_bindings.cc
index 03e01fdbf6,2ee8c120d6..0000000000
--- a/shell/common/node_bindings.cc
+++ b/shell/common/node_bindings.cc
@@@ -333,22 -338,27 +333,46 @@@ bool IsAllowedOption(const std::string_
  // Initialize NODE_OPTIONS to pass to Node.js
  // See https://nodejs.org/api/cli.html#cli_node_options_options
  void SetNodeOptions(base::Environment* env) {
++<<<<<<< HEAD
 +  // Options that are unilaterally disallowed
 +  static constexpr auto disallowed =
 +      base::MakeFixedFlatSetSorted<std::string_view>({
 +          "--enable-fips",
 +          "--experimental-policy",
 +          "--force-fips",
 +          "--openssl-config",
 +          "--use-bundled-ca",
 +          "--use-openssl-ca",
 +      });
 +
 +  static constexpr auto pkg_opts =
 +      base::MakeFixedFlatSetSorted<std::string_view>({
 +          "--http-parser",
 +          "--max-http-header-size",
 +      });
++=======
+   // Options that are expressly disallowed
+   static constexpr auto disallowed = base::MakeFixedFlatSet<std::string_view>({
+       "--enable-fips",
+       "--experimental-policy",
+       "--force-fips",
+       "--openssl-config",
+       "--use-bundled-ca",
+       "--use-openssl-ca",
+   });
+ 
+   static constexpr auto pkg_opts = base::MakeFixedFlatSet<std::string_view>({
+       "--http-parser",
+       "--max-http-header-size",
+   });
++>>>>>>> feat: support `NODE_EXTRA_CA_CERTS`
+ 
+   if (env->HasVar("NODE_EXTRA_CA_CERTS")) {
+     if (!electron::fuses::IsNodeOptionsEnabled()) {
+       LOG(WARNING) << "NODE_OPTIONS ignored due to disabled nodeOptions fuse.";
+       env->UnSetVar("NODE_EXTRA_CA_CERTS");
+     }
+   }
  
    if (env->HasVar("NODE_OPTIONS")) {
      if (electron::fuses::IsNodeOptionsEnabled()) {
* Unmerged path patches/node/feat_optionally_prevent_calling_v8_enablewebassemblytraphandler.patch

Annotations

Check failure on line 56 in script/node-disabled-tests.json

See this annotation in the file changed.

@trop trop / Backportable? - 28-x-y

script/node-disabled-tests.json#L55-L56

Patch Conflict
Raw output
++<<<<<<< HEAD
 +  "parallel/test-tls-cert-chains-concat",
 +  "parallel/test-tls-cert-chains-in-ca",
++=======
+   "parallel/test-tls-alpn-server-client",
++>>>>>>> feat: support NODE_EXTRA_CA_CERTS

Check failure on line 351 in shell/common/node_bindings.cc

See this annotation in the file changed.

@trop trop / Backportable? - 28-x-y

shell/common/node_bindings.cc#L336-L351

Patch Conflict
Raw output
++<<<<<<< HEAD
 +  // Options that are unilaterally disallowed
 +  static constexpr auto disallowed =
 +      base::MakeFixedFlatSetSorted<std::string_view>({
 +          "--enable-fips",
 +          "--experimental-policy",
 +          "--force-fips",
 +          "--openssl-config",
 +          "--use-bundled-ca",
 +          "--use-openssl-ca",
 +      });
 +
 +  static constexpr auto pkg_opts =
 +      base::MakeFixedFlatSetSorted<std::string_view>({
 +          "--http-parser",
 +          "--max-http-header-size",
 +      });
++=======
+   // Options that are expressly disallowed
+   static constexpr auto disallowed = base::MakeFixedFlatSet<std::string_view>({
+       "--enable-fips",
+       "--experimental-policy",
+       "--force-fips",
+       "--openssl-config",
+       "--use-bundled-ca",
+       "--use-openssl-ca",
+   });
+ 
+   static constexpr auto pkg_opts = base::MakeFixedFlatSet<std::string_view>({
+       "--http-parser",
+       "--max-http-header-size",
+   });
++>>>>>>> feat: support NODE_EXTRA_CA_CERTS

Check failure on line 56 in script/node-disabled-tests.json

See this annotation in the file changed.

@trop trop / Backportable? - 28-x-y

script/node-disabled-tests.json#L55-L56

Patch Conflict
Raw output
++<<<<<<< HEAD
 +  "parallel/test-tls-cert-chains-concat",
 +  "parallel/test-tls-cert-chains-in-ca",
++=======
+   "parallel/test-tls-alpn-server-client",
++>>>>>>> feat: support `NODE_EXTRA_CA_CERTS`

Check failure on line 351 in shell/common/node_bindings.cc

See this annotation in the file changed.

@trop trop / Backportable? - 28-x-y

shell/common/node_bindings.cc#L336-L351

Patch Conflict
Raw output
++<<<<<<< HEAD
 +  // Options that are unilaterally disallowed
 +  static constexpr auto disallowed =
 +      base::MakeFixedFlatSetSorted<std::string_view>({
 +          "--enable-fips",
 +          "--experimental-policy",
 +          "--force-fips",
 +          "--openssl-config",
 +          "--use-bundled-ca",
 +          "--use-openssl-ca",
 +      });
 +
 +  static constexpr auto pkg_opts =
 +      base::MakeFixedFlatSetSorted<std::string_view>({
 +          "--http-parser",
 +          "--max-http-header-size",
 +      });
++=======
+   // Options that are expressly disallowed
+   static constexpr auto disallowed = base::MakeFixedFlatSet<std::string_view>({
+       "--enable-fips",
+       "--experimental-policy",
+       "--force-fips",
+       "--openssl-config",
+       "--use-bundled-ca",
+       "--use-openssl-ca",
+   });
+ 
+   static constexpr auto pkg_opts = base::MakeFixedFlatSet<std::string_view>({
+       "--http-parser",
+       "--max-http-header-size",
+   });
++>>>>>>> feat: support `NODE_EXTRA_CA_CERTS`