{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/104545462","pull_request_review_id":25387758,"id":104545462,"diff_hunk":"@@ -2,52 +2,162 @@\n const common = require('../common');\n const assert = require('assert');\n \n+// Test multi-identity ('key')/multi-algorithm scenarios.\n+\n if (!common.hasCrypto) {\n   common.skip('missing crypto');\n   return;\n }\n const tls = require('tls');\n const fs = require('fs');\n \n-const options = {\n+// Key and cert are ordered as ec, rsa.\n+test({\n   key: [\n     fs.readFileSync(common.fixturesDir + '/keys/ec-key.pem'),\n     fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),\n   ],\n   cert: [\n+    fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem'),\n     fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem'),\n-    fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem')\n-  ]\n-};\n-\n-const ciphers = [];\n-\n-const server = tls.createServer(options, function(conn) {\n-  conn.end('ok');\n-}).listen(0, function() {\n-  const ecdsa = tls.connect(this.address().port, {\n-    ciphers: 'ECDHE-ECDSA-AES256-GCM-SHA384',\n-    rejectUnauthorized: false\n-  }, function() {\n-    ciphers.push(ecdsa.getCipher());\n+  ],\n+  ca: [\n+    fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem'),\n+    fs.readFileSync(common.fixturesDir + '/keys/ca1-cert.pem'),\n+  ],\n+});\n+\n+// Key and cert are in opposite order from each other (order is not required).\n+test({\n+  key: [\n+    fs.readFileSync(common.fixturesDir + '/keys/ec-key.pem'),\n+    fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),\n+  ],\n+  cert: [\n+    fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem'),\n+    fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem'),\n+  ],\n+  ca: [\n+    fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem'),\n+    fs.readFileSync(common.fixturesDir + '/keys/ca1-cert.pem'),\n+  ],\n+});\n+\n+// Key, cert, and pfx options can be used simultaneously.\n+test({\n+  key: [\n+    fs.readFileSync(common.fixturesDir + '/keys/ec-key.pem'),\n+  ],\n+  cert: [\n+    fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem'),\n+  ],\n+  pfx: fs.readFileSync(common.fixturesDir + '/keys/agent1.pfx'),\n+  passphrase: 'sample',\n+  ca: [\n+    fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem'),\n+    fs.readFileSync(common.fixturesDir + '/keys/ca1-cert.pem'),\n+  ],\n+});\n+\n+// Key and cert with mixed algorithms, and cert chains with intermediate CAs\n+test({","path":"test/parallel/test-tls-multi-key.js","position":null,"original_position":77,"commit_id":"07dbb1647721a3f6039b5c776016ef3ffc428c9b","original_commit_id":"684466923d13af276ac1da8efe93bee06d2eed6f","user":{"login":"sam-github","id":17607,"avatar_url":"https://avatars1.githubusercontent.com/u/17607?v=3","gravatar_id":"","url":"https://api.github.com/users/sam-github","html_url":"https://github.com/sam-github","followers_url":"https://api.github.com/users/sam-github/followers","following_url":"https://api.github.com/users/sam-github/following{/other_user}","gists_url":"https://api.github.com/users/sam-github/gists{/gist_id}","starred_url":"https://api.github.com/users/sam-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam-github/subscriptions","organizations_url":"https://api.github.com/users/sam-github/orgs","repos_url":"https://api.github.com/users/sam-github/repos","events_url":"https://api.github.com/users/sam-github/events{/privacy}","received_events_url":"https://api.github.com/users/sam-github/received_events","type":"User","site_admin":false},"body":"The server does not have `.ca` option, but I modified the new client CA option as you suggest.","created_at":"2017-03-06T22:52:24Z","updated_at":"2017-03-06T22:52:24Z","html_url":"https://github.com/nodejs/node/pull/10747#discussion_r104545462","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/10747","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/104545462"},"html":{"href":"https://github.com/nodejs/node/pull/10747#discussion_r104545462"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/10747"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/10747","id":101162391,"html_url":"https://github.com/nodejs/node/pull/10747","diff_url":"https://github.com/nodejs/node/pull/10747.diff","patch_url":"https://github.com/nodejs/node/pull/10747.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/10747","number":10747,"state":"open","locked":false,"title":"Generate more certs/identities, and use them for better multi-cert test coverage","user":{"login":"sam-github","id":17607,"avatar_url":"https://avatars1.githubusercontent.com/u/17607?v=3","gravatar_id":"","url":"https://api.github.com/users/sam-github","html_url":"https://github.com/sam-github","followers_url":"https://api.github.com/users/sam-github/followers","following_url":"https://api.github.com/users/sam-github/following{/other_user}","gists_url":"https://api.github.com/users/sam-github/gists{/gist_id}","starred_url":"https://api.github.com/users/sam-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam-github/subscriptions","organizations_url":"https://api.github.com/users/sam-github/orgs","repos_url":"https://api.github.com/users/sam-github/repos","events_url":"https://api.github.com/users/sam-github/events{/privacy}","received_events_url":"https://api.github.com/users/sam-github/received_events","type":"User","site_admin":false},"body":"- test: cover tls multi-identity option mixtures\r\n- test: confirm tls server suite default is its own\r\n- test: add independent multi-alg crypto identities\r\n- test: rename agent1-pfx.pem to agent1.pfx\r\n\r\n##### Checklist\r\n\r\n- [ ] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [x] tests and/or benchmarks are included\r\n- [x] commit message follows commit guidelines\r\n\r\n##### Affected core subsystem(s)\r\ntls\r\n\r\n","created_at":"2017-01-11T22:43:42Z","updated_at":"2017-03-06T22:52:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b5a0fa4e733053a8156bbc2d2bd8057b3739594","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/10747/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/10747/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/10747/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/07dbb1647721a3f6039b5c776016ef3ffc428c9b","head":{"label":"sam-github:generate-more-certs","ref":"generate-more-certs","sha":"07dbb1647721a3f6039b5c776016ef3ffc428c9b","user":{"login":"sam-github","id":17607,"avatar_url":"https://avatars1.githubusercontent.com/u/17607?v=3","gravatar_id":"","url":"https://api.github.com/users/sam-github","html_url":"https://github.com/sam-github","followers_url":"https://api.github.com/users/sam-github/followers","following_url":"https://api.github.com/users/sam-github/following{/other_user}","gists_url":"https://api.github.com/users/sam-github/gists{/gist_id}","starred_url":"https://api.github.com/users/sam-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam-github/subscriptions","organizations_url":"https://api.github.com/users/sam-github/orgs","repos_url":"https://api.github.com/users/sam-github/repos","events_url":"https://api.github.com/users/sam-github/events{/privacy}","received_events_url":"https://api.github.com/users/sam-github/received_events","type":"User","site_admin":false},"repo":{"id":28619971,"name":"node","full_name":"sam-github/node","owner":{"login":"sam-github","id":17607,"avatar_url":"https://avatars1.githubusercontent.com/u/17607?v=3","gravatar_id":"","url":"https://api.github.com/users/sam-github","html_url":"https://github.com/sam-github","followers_url":"https://api.github.com/users/sam-github/followers","following_url":"https://api.github.com/users/sam-github/following{/other_user}","gists_url":"https://api.github.com/users/sam-github/gists{/gist_id}","starred_url":"https://api.github.com/users/sam-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam-github/subscriptions","organizations_url":"https://api.github.com/users/sam-github/orgs","repos_url":"https://api.github.com/users/sam-github/repos","events_url":"https://api.github.com/users/sam-github/events{/privacy}","received_events_url":"https://api.github.com/users/sam-github/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sam-github/node","description":"Evented IO for V8 JavaScript","fork":true,"url":"https://api.github.com/repos/sam-github/node","forks_url":"https://api.github.com/repos/sam-github/node/forks","keys_url":"https://api.github.com/repos/sam-github/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sam-github/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sam-github/node/teams","hooks_url":"https://api.github.com/repos/sam-github/node/hooks","issue_events_url":"https://api.github.com/repos/sam-github/node/issues/events{/number}","events_url":"https://api.github.com/repos/sam-github/node/events","assignees_url":"https://api.github.com/repos/sam-github/node/assignees{/user}","branches_url":"https://api.github.com/repos/sam-github/node/branches{/branch}","tags_url":"https://api.github.com/repos/sam-github/node/tags","blobs_url":"https://api.github.com/repos/sam-github/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sam-github/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sam-github/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/sam-github/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sam-github/node/statuses/{sha}","languages_url":"https://api.github.com/repos/sam-github/node/languages","stargazers_url":"https://api.github.com/repos/sam-github/node/stargazers","contributors_url":"https://api.github.com/repos/sam-github/node/contributors","subscribers_url":"https://api.github.com/repos/sam-github/node/subscribers","subscription_url":"https://api.github.com/repos/sam-github/node/subscription","commits_url":"https://api.github.com/repos/sam-github/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/sam-github/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/sam-github/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/sam-github/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/sam-github/node/contents/{+path}","compare_url":"https://api.github.com/repos/sam-github/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sam-github/node/merges","archive_url":"https://api.github.com/repos/sam-github/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sam-github/node/downloads","issues_url":"https://api.github.com/repos/sam-github/node/issues{/number}","pulls_url":"https://api.github.com/repos/sam-github/node/pulls{/number}","milestones_url":"https://api.github.com/repos/sam-github/node/milestones{/number}","notifications_url":"https://api.github.com/repos/sam-github/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sam-github/node/labels{/name}","releases_url":"https://api.github.com/repos/sam-github/node/releases{/id}","deployments_url":"https://api.github.com/repos/sam-github/node/deployments","created_at":"2014-12-30T06:15:39Z","updated_at":"2016-10-24T15:57:21Z","pushed_at":"2017-03-06T22:51:23Z","git_url":"git://github.com/sam-github/node.git","ssh_url":"git@github.com:sam-github/node.git","clone_url":"https://github.com/sam-github/node.git","svn_url":"https://github.com/sam-github/node","homepage":null,"size":256493,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"a2ae08999b55088cbc447e5801f009694d71c3a7","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars0.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://avatars0.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}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2017-03-06T22:46:46Z","pushed_at":"2017-03-06T22:51:25Z","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":268694,"stargazers_count":32422,"watchers_count":32422,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6081,"mirror_url":null,"open_issues_count":1023,"forks":6081,"open_issues":1023,"watchers":32422,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/10747"},"html":{"href":"https://github.com/nodejs/node/pull/10747"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/10747"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/10747/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/10747/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/10747/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/07dbb1647721a3f6039b5c776016ef3ffc428c9b"}}}}
{"actor":{"display_login":"sam-github"}}