{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/46765100","id":46765100,"diff_hunk":"@@ -608,8 +584,74 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx,\n   }\n \n  end:\n-  if (x != nullptr)\n+  if (ret && x != nullptr) {\n     *cert = x;\n+    CRYPTO_add(&(*cert)->references, 1, CRYPTO_LOCK_X509);\n+  }\n+  return ret;\n+}\n+\n+\n+// Read a file that contains our certificate in \"PEM\" format,\n+// possibly followed by a sequence of CA certificates that should be\n+// sent to the peer in the Certificate message.\n+//\n+// Taken from OpenSSL - editted for style.","path":"src/node_crypto.cc","position":null,"original_position":88,"commit_id":"e0f6f4ba45728698637e077dede6cdffe37eb705","original_commit_id":"4e9d541b5b309ce8b952126b8225c998e206b506","user":{"login":"indutny","id":238531,"avatar_url":"https://avatars.githubusercontent.com/u/238531?v=3","gravatar_id":"","url":"https://api.github.com/users/indutny","html_url":"https://github.com/indutny","followers_url":"https://api.github.com/users/indutny/followers","following_url":"https://api.github.com/users/indutny/following{/other_user}","gists_url":"https://api.github.com/users/indutny/gists{/gist_id}","starred_url":"https://api.github.com/users/indutny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indutny/subscriptions","organizations_url":"https://api.github.com/users/indutny/orgs","repos_url":"https://api.github.com/users/indutny/repos","events_url":"https://api.github.com/users/indutny/events{/privacy}","received_events_url":"https://api.github.com/users/indutny/received_events","type":"User","site_admin":false},"body":"Ack.","created_at":"2015-12-06T00:45:19Z","updated_at":"2015-12-06T00:45:19Z","html_url":"https://github.com/nodejs/node/pull/4165#discussion_r46765100","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/4165","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/46765100"},"html":{"href":"https://github.com/nodejs/node/pull/4165#discussion_r46765100"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/4165"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/4165","id":52765851,"html_url":"https://github.com/nodejs/node/pull/4165","diff_url":"https://github.com/nodejs/node/pull/4165.diff","patch_url":"https://github.com/nodejs/node/pull/4165.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/4165","number":4165,"state":"open","locked":false,"title":"crypto: load PFX chain the same way as regular one","user":{"login":"indutny","id":238531,"avatar_url":"https://avatars.githubusercontent.com/u/238531?v=3","gravatar_id":"","url":"https://api.github.com/users/indutny","html_url":"https://github.com/indutny","followers_url":"https://api.github.com/users/indutny/followers","following_url":"https://api.github.com/users/indutny/following{/other_user}","gists_url":"https://api.github.com/users/indutny/gists{/gist_id}","starred_url":"https://api.github.com/users/indutny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indutny/subscriptions","organizations_url":"https://api.github.com/users/indutny/orgs","repos_url":"https://api.github.com/users/indutny/repos","events_url":"https://api.github.com/users/indutny/events{/privacy}","received_events_url":"https://api.github.com/users/indutny/received_events","type":"User","site_admin":false},"body":"Load the certificate chain from the PFX file the same as we do it for a\r\nregular certificate chain.\r\n\r\nFix: #4127 \r\n\r\n(No test for this yet, but will work on it once it will be confirmed to fix the problem)","created_at":"2015-12-05T21:54:50Z","updated_at":"2015-12-06T00:45:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a7618552dcadb9d19d5f885b5add229b3652656","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/4165/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/4165/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/4165/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/e0f6f4ba45728698637e077dede6cdffe37eb705","head":{"label":"indutny:fix/gh-4127","ref":"fix/gh-4127","sha":"e0f6f4ba45728698637e077dede6cdffe37eb705","user":{"login":"indutny","id":238531,"avatar_url":"https://avatars.githubusercontent.com/u/238531?v=3","gravatar_id":"","url":"https://api.github.com/users/indutny","html_url":"https://github.com/indutny","followers_url":"https://api.github.com/users/indutny/followers","following_url":"https://api.github.com/users/indutny/following{/other_user}","gists_url":"https://api.github.com/users/indutny/gists{/gist_id}","starred_url":"https://api.github.com/users/indutny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indutny/subscriptions","organizations_url":"https://api.github.com/users/indutny/orgs","repos_url":"https://api.github.com/users/indutny/repos","events_url":"https://api.github.com/users/indutny/events{/privacy}","received_events_url":"https://api.github.com/users/indutny/received_events","type":"User","site_admin":false},"repo":{"id":27231488,"name":"io.js","full_name":"indutny/io.js","owner":{"login":"indutny","id":238531,"avatar_url":"https://avatars.githubusercontent.com/u/238531?v=3","gravatar_id":"","url":"https://api.github.com/users/indutny","html_url":"https://github.com/indutny","followers_url":"https://api.github.com/users/indutny/followers","following_url":"https://api.github.com/users/indutny/following{/other_user}","gists_url":"https://api.github.com/users/indutny/gists{/gist_id}","starred_url":"https://api.github.com/users/indutny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indutny/subscriptions","organizations_url":"https://api.github.com/users/indutny/orgs","repos_url":"https://api.github.com/users/indutny/repos","events_url":"https://api.github.com/users/indutny/events{/privacy}","received_events_url":"https://api.github.com/users/indutny/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/indutny/io.js","description":"Evented IO for V8 JavaScript","fork":true,"url":"https://api.github.com/repos/indutny/io.js","forks_url":"https://api.github.com/repos/indutny/io.js/forks","keys_url":"https://api.github.com/repos/indutny/io.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indutny/io.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indutny/io.js/teams","hooks_url":"https://api.github.com/repos/indutny/io.js/hooks","issue_events_url":"https://api.github.com/repos/indutny/io.js/issues/events{/number}","events_url":"https://api.github.com/repos/indutny/io.js/events","assignees_url":"https://api.github.com/repos/indutny/io.js/assignees{/user}","branches_url":"https://api.github.com/repos/indutny/io.js/branches{/branch}","tags_url":"https://api.github.com/repos/indutny/io.js/tags","blobs_url":"https://api.github.com/repos/indutny/io.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indutny/io.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indutny/io.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/indutny/io.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indutny/io.js/statuses/{sha}","languages_url":"https://api.github.com/repos/indutny/io.js/languages","stargazers_url":"https://api.github.com/repos/indutny/io.js/stargazers","contributors_url":"https://api.github.com/repos/indutny/io.js/contributors","subscribers_url":"https://api.github.com/repos/indutny/io.js/subscribers","subscription_url":"https://api.github.com/repos/indutny/io.js/subscription","commits_url":"https://api.github.com/repos/indutny/io.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/indutny/io.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/indutny/io.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/indutny/io.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/indutny/io.js/contents/{+path}","compare_url":"https://api.github.com/repos/indutny/io.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indutny/io.js/merges","archive_url":"https://api.github.com/repos/indutny/io.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indutny/io.js/downloads","issues_url":"https://api.github.com/repos/indutny/io.js/issues{/number}","pulls_url":"https://api.github.com/repos/indutny/io.js/pulls{/number}","milestones_url":"https://api.github.com/repos/indutny/io.js/milestones{/number}","notifications_url":"https://api.github.com/repos/indutny/io.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indutny/io.js/labels{/name}","releases_url":"https://api.github.com/repos/indutny/io.js/releases{/id}","created_at":"2014-11-27T15:38:33Z","updated_at":"2015-02-18T15:41:43Z","pushed_at":"2015-12-06T00:45:17Z","git_url":"git://github.com/indutny/io.js.git","ssh_url":"git@github.com:indutny/io.js.git","clone_url":"https://github.com/indutny/io.js.git","svn_url":"https://github.com/indutny/io.js","homepage":null,"size":157900,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"v0.12"}},"base":{"label":"nodejs:master","ref":"master","sha":"e2dec988377b469c71e0cf9463b7a3214a41cc7d","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","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,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","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},"private":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}","created_at":"2014-11-26T19:57:11Z","updated_at":"2015-12-05T23:34:04Z","pushed_at":"2015-12-06T00:45:18Z","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":175515,"stargazers_count":17962,"watchers_count":17962,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1952,"mirror_url":null,"open_issues_count":595,"forks":1952,"open_issues":595,"watchers":17962,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/4165"},"html":{"href":"https://github.com/nodejs/node/pull/4165"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/4165"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/4165/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/4165/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/4165/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/e0f6f4ba45728698637e077dede6cdffe37eb705"}}}}