{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/52562348","id":52562348,"diff_hunk":"@@ -23,6 +23,10 @@ class NodeBIO {\n \n   static BIO* New();\n \n+  // NewFixed takes a copy of `len` bytes from `data` and returns a BIO that,\n+  // when read from, returns those bytes followed by EOF.\n+  static BIO* NewFixed(const char *data, size_t len);","path":"src/node_crypto_bio.h","position":null,"original_position":6,"commit_id":"26f2dafd30c2d180224b7b015293b683094cca1f","original_commit_id":"87c9f7ae77ad9076e2b0859f2e46474dcfd267f1","user":{"login":"agl","id":21203,"avatar_url":"https://avatars.githubusercontent.com/u/21203?v=3","gravatar_id":"","url":"https://api.github.com/users/agl","html_url":"https://github.com/agl","followers_url":"https://api.github.com/users/agl/followers","following_url":"https://api.github.com/users/agl/following{/other_user}","gists_url":"https://api.github.com/users/agl/gists{/gist_id}","starred_url":"https://api.github.com/users/agl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agl/subscriptions","organizations_url":"https://api.github.com/users/agl/orgs","repos_url":"https://api.github.com/users/agl/repos","events_url":"https://api.github.com/users/agl/events{/privacy}","received_events_url":"https://api.github.com/users/agl/received_events","type":"User","site_admin":false},"body":"(Done.)","created_at":"2016-02-11T04:03:11Z","updated_at":"2016-02-11T04:03:11Z","html_url":"https://github.com/nodejs/node/pull/5105#discussion_r52562348","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/5105","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/52562348"},"html":{"href":"https://github.com/nodejs/node/pull/5105#discussion_r52562348"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/5105"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/5105","id":58474073,"html_url":"https://github.com/nodejs/node/pull/5105","diff_url":"https://github.com/nodejs/node/pull/5105.diff","patch_url":"https://github.com/nodejs/node/pull/5105.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/5105","number":5105,"state":"open","locked":false,"title":"crypto: have fixed NodeBIOs return EOF.","user":{"login":"agl","id":21203,"avatar_url":"https://avatars.githubusercontent.com/u/21203?v=3","gravatar_id":"","url":"https://api.github.com/users/agl","html_url":"https://github.com/agl","followers_url":"https://api.github.com/users/agl/followers","following_url":"https://api.github.com/users/agl/following{/other_user}","gists_url":"https://api.github.com/users/agl/gists{/gist_id}","starred_url":"https://api.github.com/users/agl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agl/subscriptions","organizations_url":"https://api.github.com/users/agl/orgs","repos_url":"https://api.github.com/users/agl/repos","events_url":"https://api.github.com/users/agl/events{/privacy}","received_events_url":"https://api.github.com/users/agl/received_events","type":"User","site_admin":false},"body":"Prior to this change, the NodeBIO objects used to wrap fixed data had\r\n`num` equal to -1. This caused them to return -1 and set the retry flags\r\nwhen they ran out of data. Since the data is fixed, that's incorrect.\r\nInstead they should return zero to signal EOF.\r\n\r\nThis change adds a new, static function, NodeBIO::NewFixed to create a\r\nBIO that wraps fixed data and which returns zero when exhausted.\r\n\r\nThe practical impact of this is limited since most (all?) the parsing\r\nfunctions that these BIOs get passed to consider any return value less\r\nthan one to be EOF and ignore the retry flags anyway.","created_at":"2016-02-05T19:37:07Z","updated_at":"2016-02-11T04:03:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9b506606b4f984bf7df7aea70fbac9488ab9e8c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/5105/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/5105/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/5105/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/26f2dafd30c2d180224b7b015293b683094cca1f","head":{"label":"agl:biofixed","ref":"biofixed","sha":"26f2dafd30c2d180224b7b015293b683094cca1f","user":{"login":"agl","id":21203,"avatar_url":"https://avatars.githubusercontent.com/u/21203?v=3","gravatar_id":"","url":"https://api.github.com/users/agl","html_url":"https://github.com/agl","followers_url":"https://api.github.com/users/agl/followers","following_url":"https://api.github.com/users/agl/following{/other_user}","gists_url":"https://api.github.com/users/agl/gists{/gist_id}","starred_url":"https://api.github.com/users/agl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agl/subscriptions","organizations_url":"https://api.github.com/users/agl/orgs","repos_url":"https://api.github.com/users/agl/repos","events_url":"https://api.github.com/users/agl/events{/privacy}","received_events_url":"https://api.github.com/users/agl/received_events","type":"User","site_admin":false},"repo":{"id":50524956,"name":"node","full_name":"agl/node","owner":{"login":"agl","id":21203,"avatar_url":"https://avatars.githubusercontent.com/u/21203?v=3","gravatar_id":"","url":"https://api.github.com/users/agl","html_url":"https://github.com/agl","followers_url":"https://api.github.com/users/agl/followers","following_url":"https://api.github.com/users/agl/following{/other_user}","gists_url":"https://api.github.com/users/agl/gists{/gist_id}","starred_url":"https://api.github.com/users/agl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agl/subscriptions","organizations_url":"https://api.github.com/users/agl/orgs","repos_url":"https://api.github.com/users/agl/repos","events_url":"https://api.github.com/users/agl/events{/privacy}","received_events_url":"https://api.github.com/users/agl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/agl/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/agl/node","forks_url":"https://api.github.com/repos/agl/node/forks","keys_url":"https://api.github.com/repos/agl/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/agl/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/agl/node/teams","hooks_url":"https://api.github.com/repos/agl/node/hooks","issue_events_url":"https://api.github.com/repos/agl/node/issues/events{/number}","events_url":"https://api.github.com/repos/agl/node/events","assignees_url":"https://api.github.com/repos/agl/node/assignees{/user}","branches_url":"https://api.github.com/repos/agl/node/branches{/branch}","tags_url":"https://api.github.com/repos/agl/node/tags","blobs_url":"https://api.github.com/repos/agl/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/agl/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/agl/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/agl/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/agl/node/statuses/{sha}","languages_url":"https://api.github.com/repos/agl/node/languages","stargazers_url":"https://api.github.com/repos/agl/node/stargazers","contributors_url":"https://api.github.com/repos/agl/node/contributors","subscribers_url":"https://api.github.com/repos/agl/node/subscribers","subscription_url":"https://api.github.com/repos/agl/node/subscription","commits_url":"https://api.github.com/repos/agl/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/agl/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/agl/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/agl/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/agl/node/contents/{+path}","compare_url":"https://api.github.com/repos/agl/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/agl/node/merges","archive_url":"https://api.github.com/repos/agl/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/agl/node/downloads","issues_url":"https://api.github.com/repos/agl/node/issues{/number}","pulls_url":"https://api.github.com/repos/agl/node/pulls{/number}","milestones_url":"https://api.github.com/repos/agl/node/milestones{/number}","notifications_url":"https://api.github.com/repos/agl/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/agl/node/labels{/name}","releases_url":"https://api.github.com/repos/agl/node/releases{/id}","deployments_url":"https://api.github.com/repos/agl/node/deployments","created_at":"2016-01-27T17:31:22Z","updated_at":"2016-01-27T17:31:31Z","pushed_at":"2016-02-11T04:02:52Z","git_url":"git://github.com/agl/node.git","ssh_url":"git@github.com:agl/node.git","clone_url":"https://github.com/agl/node.git","svn_url":"https://github.com/agl/node","homepage":"https://nodejs.org","size":176040,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"2848f84332dc2292fd08df083640ac09e5e571aa","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}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2016-02-11T02:40:57Z","pushed_at":"2016-02-11T04:02:53Z","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":208232,"stargazers_count":20103,"watchers_count":20103,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2478,"mirror_url":null,"open_issues_count":718,"forks":2478,"open_issues":718,"watchers":20103,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/5105"},"html":{"href":"https://github.com/nodejs/node/pull/5105"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/5105"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/5105/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/5105/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/5105/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/26f2dafd30c2d180224b7b015293b683094cca1f"}}}}