From 0b2d0eb854876c218840b28dae6fc045e9864393 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Tue, 24 Jan 2017 13:15:28 -0800 Subject: [PATCH] fixup! crypto: allow adding extra certs to well-known CAs --- doc/api/cli.md | 4 ++-- src/node_crypto.cc | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index fbe44500ef0f97..b64cf55e849b3d 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -232,8 +232,8 @@ added: XXX When set, the well known "root" CAs (like VeriSign) will be extended with the extra certificates in `file`. The file should consist of one or more trusted -certificates in PEM format. A message will be emitted (once) with -[`process.emitWarning()`][emit_warning] if the file is missing or +certificates in PEM format. A message will be printed to stderr (once) +if the file is missing or misformatted, but any errors are otherwise ignored. Note that neither the well known nor extra certificates are used when the `ca` diff --git a/src/node_crypto.cc b/src/node_crypto.cc index e74e838cd650b8..e58b0bc25bb65b 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -822,10 +822,10 @@ void SecureContext::AddRootCerts(const FunctionCallbackInfo& args) { root_cert_store, extra_root_certs_file.c_str()); if (err) { - ProcessEmitWarning(sc->env(), - "Ignoring extra certs from `%s`, load failed: %s\n", - extra_root_certs_file.c_str(), - ERR_error_string(err, nullptr)); + fprintf(stderr, + "Warning: Ignoring extra certs from `%s`, load failed: %s\n", + extra_root_certs_file.c_str(), + ERR_error_string(err, nullptr)); } } }