{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/226271849","pull_request_review_id":166050717,"id":226271849,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjI3MTg0OQ==","diff_hunk":"@@ -877,14 +885,27 @@ void SecureContext::AddRootCerts(const FunctionCallbackInfo<Value>& args) {\n         // We do not call back into JS after this line anyway, so ignoring\n         // the return value of ProcessEmitWarning does not affect how a\n         // possible exception would be propagated.\n-        ProcessEmitWarning(sc->env(),\n+        ProcessEmitWarning(env,\n                            \"Ignoring extra certs from `%s`, \"\n                            \"load failed: %s\\n\",\n                            extra_root_certs_file.c_str(),\n                            ERR_error_string(err, nullptr));\n+      } else {\n+        extra_root_certs_file_loaded = true;\n       }\n     }\n   }\n+}\n+\n+\n+void SecureContext::AddRootCerts(const FunctionCallbackInfo<Value>& args) {\n+  SecureContext* sc;\n+  ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder());\n+  ClearErrorOnReturn clear_error_on_return;\n+\n+  if (root_cert_store == nullptr) {","path":"src/node_crypto.cc","position":55,"original_position":55,"commit_id":"f99d0861f0426699ad5fb2e526cf6143a5e2b8d2","original_commit_id":"bcef787dce0a380e3ce66936e72c49176de67838","user":{"login":"oyyd","id":5847587,"node_id":"MDQ6VXNlcjU4NDc1ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/5847587?v=4","gravatar_id":"","url":"https://api.github.com/users/oyyd","html_url":"https://github.com/oyyd","followers_url":"https://api.github.com/users/oyyd/followers","following_url":"https://api.github.com/users/oyyd/following{/other_user}","gists_url":"https://api.github.com/users/oyyd/gists{/gist_id}","starred_url":"https://api.github.com/users/oyyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oyyd/subscriptions","organizations_url":"https://api.github.com/users/oyyd/orgs","repos_url":"https://api.github.com/users/oyyd/repos","events_url":"https://api.github.com/users/oyyd/events{/privacy}","received_events_url":"https://api.github.com/users/oyyd/received_events","type":"User","site_admin":false},"body":"No. `CHECK_NOT_NULL` might throw so that it is not expected here. But thanks for reminding me of using `CHECK_NOT_NULL`.","created_at":"2018-10-18T11:43:51Z","updated_at":"2018-10-18T11:43:52Z","html_url":"https://github.com/nodejs/node/pull/23354#discussion_r226271849","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/23354","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/226271849"},"html":{"href":"https://github.com/nodejs/node/pull/23354#discussion_r226271849"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/23354"}},"in_reply_to_id":225993571},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/23354","id":221443099,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxNDQzMDk5","html_url":"https://github.com/nodejs/node/pull/23354","diff_url":"https://github.com/nodejs/node/pull/23354.diff","patch_url":"https://github.com/nodejs/node/pull/23354.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/23354","number":23354,"state":"open","locked":false,"title":"tls: load NODE_EXTRA_CA_CERTS at startup","user":{"login":"oyyd","id":5847587,"node_id":"MDQ6VXNlcjU4NDc1ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/5847587?v=4","gravatar_id":"","url":"https://api.github.com/users/oyyd","html_url":"https://github.com/oyyd","followers_url":"https://api.github.com/users/oyyd/followers","following_url":"https://api.github.com/users/oyyd/following{/other_user}","gists_url":"https://api.github.com/users/oyyd/gists{/gist_id}","starred_url":"https://api.github.com/users/oyyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oyyd/subscriptions","organizations_url":"https://api.github.com/users/oyyd/orgs","repos_url":"https://api.github.com/users/oyyd/repos","events_url":"https://api.github.com/users/oyyd/events{/privacy}","received_events_url":"https://api.github.com/users/oyyd/received_events","type":"User","site_admin":false},"body":"`NODE_EXTRA_CA_CERTS` is not intended to be used to set the paths of extra certificates and this approach to setting is not reliable. This commit makes node load extra certificates at startup rather than on first use.\r\n\r\nFixes: #20434\r\nRefs: #20432\r\n\r\n<!--\r\nThank you for your pull request. Please provide a description above and review\r\nthe requirements below.\r\n\r\nBug fixes and new features should include tests and possibly benchmarks.\r\n\r\nContributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [x] tests and/or benchmarks are included\r\n- [x] documentation is changed or added\r\n- [x] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)\r\n","created_at":"2018-10-09T13:39:01Z","updated_at":"2018-10-18T11:43:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4dba99c4274b5cf65d05ad0e959770edd2d6966a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":155267502,"node_id":"MDU6TGFiZWwxNTUyNjc1MDI=","url":"https://api.github.com/repos/nodejs/node/labels/C++","name":"C++","color":"e11d21","default":false},{"id":155267357,"node_id":"MDU6TGFiZWwxNTUyNjczNTc=","url":"https://api.github.com/repos/nodejs/node/labels/crypto","name":"crypto","color":"009800","default":false},{"id":169485514,"node_id":"MDU6TGFiZWwxNjk0ODU1MTQ=","url":"https://api.github.com/repos/nodejs/node/labels/semver-major","name":"semver-major","color":"fbca04","default":false},{"id":155267349,"node_id":"MDU6TGFiZWwxNTUyNjczNDk=","url":"https://api.github.com/repos/nodejs/node/labels/tls","name":"tls","color":"fad8c7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/23354/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/23354/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/23354/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/f99d0861f0426699ad5fb2e526cf6143a5e2b8d2","head":{"label":"oyyd:tls-cert","ref":"tls-cert","sha":"f99d0861f0426699ad5fb2e526cf6143a5e2b8d2","user":{"login":"oyyd","id":5847587,"node_id":"MDQ6VXNlcjU4NDc1ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/5847587?v=4","gravatar_id":"","url":"https://api.github.com/users/oyyd","html_url":"https://github.com/oyyd","followers_url":"https://api.github.com/users/oyyd/followers","following_url":"https://api.github.com/users/oyyd/following{/other_user}","gists_url":"https://api.github.com/users/oyyd/gists{/gist_id}","starred_url":"https://api.github.com/users/oyyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oyyd/subscriptions","organizations_url":"https://api.github.com/users/oyyd/orgs","repos_url":"https://api.github.com/users/oyyd/repos","events_url":"https://api.github.com/users/oyyd/events{/privacy}","received_events_url":"https://api.github.com/users/oyyd/received_events","type":"User","site_admin":false},"repo":{"id":138382103,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgzODIxMDM=","name":"node","full_name":"oyyd/node","private":false,"owner":{"login":"oyyd","id":5847587,"node_id":"MDQ6VXNlcjU4NDc1ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/5847587?v=4","gravatar_id":"","url":"https://api.github.com/users/oyyd","html_url":"https://github.com/oyyd","followers_url":"https://api.github.com/users/oyyd/followers","following_url":"https://api.github.com/users/oyyd/following{/other_user}","gists_url":"https://api.github.com/users/oyyd/gists{/gist_id}","starred_url":"https://api.github.com/users/oyyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oyyd/subscriptions","organizations_url":"https://api.github.com/users/oyyd/orgs","repos_url":"https://api.github.com/users/oyyd/repos","events_url":"https://api.github.com/users/oyyd/events{/privacy}","received_events_url":"https://api.github.com/users/oyyd/received_events","type":"User","site_admin":false},"html_url":"https://github.com/oyyd/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/oyyd/node","forks_url":"https://api.github.com/repos/oyyd/node/forks","keys_url":"https://api.github.com/repos/oyyd/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oyyd/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oyyd/node/teams","hooks_url":"https://api.github.com/repos/oyyd/node/hooks","issue_events_url":"https://api.github.com/repos/oyyd/node/issues/events{/number}","events_url":"https://api.github.com/repos/oyyd/node/events","assignees_url":"https://api.github.com/repos/oyyd/node/assignees{/user}","branches_url":"https://api.github.com/repos/oyyd/node/branches{/branch}","tags_url":"https://api.github.com/repos/oyyd/node/tags","blobs_url":"https://api.github.com/repos/oyyd/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oyyd/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oyyd/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/oyyd/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oyyd/node/statuses/{sha}","languages_url":"https://api.github.com/repos/oyyd/node/languages","stargazers_url":"https://api.github.com/repos/oyyd/node/stargazers","contributors_url":"https://api.github.com/repos/oyyd/node/contributors","subscribers_url":"https://api.github.com/repos/oyyd/node/subscribers","subscription_url":"https://api.github.com/repos/oyyd/node/subscription","commits_url":"https://api.github.com/repos/oyyd/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/oyyd/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/oyyd/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/oyyd/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/oyyd/node/contents/{+path}","compare_url":"https://api.github.com/repos/oyyd/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oyyd/node/merges","archive_url":"https://api.github.com/repos/oyyd/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oyyd/node/downloads","issues_url":"https://api.github.com/repos/oyyd/node/issues{/number}","pulls_url":"https://api.github.com/repos/oyyd/node/pulls{/number}","milestones_url":"https://api.github.com/repos/oyyd/node/milestones{/number}","notifications_url":"https://api.github.com/repos/oyyd/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oyyd/node/labels{/name}","releases_url":"https://api.github.com/repos/oyyd/node/releases{/id}","deployments_url":"https://api.github.com/repos/oyyd/node/deployments","created_at":"2018-06-23T07:48:40Z","updated_at":"2018-10-15T04:54:51Z","pushed_at":"2018-10-18T11:30:31Z","git_url":"git://github.com/oyyd/node.git","ssh_url":"git@github.com:oyyd/node.git","clone_url":"https://github.com/oyyd/node.git","svn_url":"https://github.com/oyyd/node","homepage":"https://nodejs.org","size":422820,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"cf3f8dd42ea153efce77d69f7be9ca0f99cc7b09","user":{"login":"nodejs","id":9950313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NTAzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"node_id":"MDEwOlJlcG9zaXRvcnkyNzE5Mzc3OQ==","name":"node","full_name":"nodejs/node","private":false,"owner":{"login":"nodejs","id":9950313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NTAzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2018-10-18T11:37:31Z","pushed_at":"2018-10-18T11:30:40Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":424822,"stargazers_count":54478,"watchers_count":54478,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11814,"mirror_url":null,"archived":false,"open_issues_count":913,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":11814,"open_issues":913,"watchers":54478,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/23354"},"html":{"href":"https://github.com/nodejs/node/pull/23354"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/23354"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/23354/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/23354/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/23354/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/f99d0861f0426699ad5fb2e526cf6143a5e2b8d2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"oyyd"}}