Skip to content

Commit

Permalink
fixup! crypto: allow adding extra certs to well-known CAs
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-github committed Jan 24, 2017
1 parent b342679 commit 0b2d0eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
8 changes: 4 additions & 4 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -822,10 +822,10 @@ void SecureContext::AddRootCerts(const FunctionCallbackInfo<Value>& 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));
}
}
}
Expand Down

0 comments on commit 0b2d0eb

Please sign in to comment.