{"action":"created","comment":{"url":"https://api.github.com/repos/openssl/openssl/pulls/comments/69268511","id":69268511,"diff_hunk":"@@ -115,32 +115,38 @@ SCT *SCT_new_from_base64(unsigned char version, const char *logid_base64,\n     return NULL;\n }\n \n-CTLOG *CTLOG_new_from_base64(const char *pkey_base64, const char *name)\n+int CTLOG_new_from_base64(CTLOG **ct_log, const char *pkey_base64, const char *name)\n {\n     unsigned char *pkey_der = NULL;\n     int pkey_der_len = ct_base64_decode(pkey_base64, &pkey_der);\n     const unsigned char *p;\n     EVP_PKEY *pkey = NULL;\n     CTLOG *log = NULL;\n \n+    if (ct_log != NULL)\n+        *ct_log = NULL;\n+\n     if (pkey_der_len <= 0) {\n         CTerr(CT_F_CTLOG_NEW_FROM_BASE64, CT_R_LOG_CONF_INVALID_KEY);\n-        return NULL;\n+        return 0;\n     }\n \n     p = pkey_der;\n     pkey = d2i_PUBKEY(NULL, &p, pkey_der_len);\n     OPENSSL_free(pkey_der);\n     if (pkey == NULL) {\n         CTerr(CT_F_CTLOG_NEW_FROM_BASE64, CT_R_LOG_CONF_INVALID_KEY);\n-        return NULL;\n+        return 0;\n     }\n \n     log = CTLOG_new(pkey, name);\n     if (log == NULL) {\n         EVP_PKEY_free(pkey);\n-        return NULL;\n+        return -1;","path":"crypto/ct/ct_b64.c","position":35,"original_position":35,"commit_id":"01dc89e460f2239c5776b8142a9a64ce2a8b6268","original_commit_id":"01dc89e460f2239c5776b8142a9a64ce2a8b6268","user":{"login":"mattcaswell","id":7422273,"avatar_url":"https://avatars.githubusercontent.com/u/7422273?v=3","gravatar_id":"","url":"https://api.github.com/users/mattcaswell","html_url":"https://github.com/mattcaswell","followers_url":"https://api.github.com/users/mattcaswell/followers","following_url":"https://api.github.com/users/mattcaswell/following{/other_user}","gists_url":"https://api.github.com/users/mattcaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/mattcaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattcaswell/subscriptions","organizations_url":"https://api.github.com/users/mattcaswell/orgs","repos_url":"https://api.github.com/users/mattcaswell/repos","events_url":"https://api.github.com/users/mattcaswell/events{/privacy}","received_events_url":"https://api.github.com/users/mattcaswell/received_events","type":"User","site_admin":false},"body":"I think the return values need documenting somewhere - probably as a comment before the start of the function. I note that this *new* function doesn't have an associated pod file...or any of the other CTLOG functions for that matter....grrrrr....oh well, not within the scope of this PR. :-(","created_at":"2016-07-01T08:50:12Z","updated_at":"2016-07-01T08:50:12Z","html_url":"https://github.com/openssl/openssl/pull/1170#discussion_r69268511","pull_request_url":"https://api.github.com/repos/openssl/openssl/pulls/1170","_links":{"self":{"href":"https://api.github.com/repos/openssl/openssl/pulls/comments/69268511"},"html":{"href":"https://github.com/openssl/openssl/pull/1170#discussion_r69268511"},"pull_request":{"href":"https://api.github.com/repos/openssl/openssl/pulls/1170"}}},"pull_request":{"url":"https://api.github.com/repos/openssl/openssl/pulls/1170","id":72614462,"html_url":"https://github.com/openssl/openssl/pull/1170","diff_url":"https://github.com/openssl/openssl/pull/1170.diff","patch_url":"https://github.com/openssl/openssl/pull/1170.patch","issue_url":"https://api.github.com/repos/openssl/openssl/issues/1170","number":1170,"state":"open","locked":false,"title":"Add checks on sk_TYPE_push() returned value in crypto module","user":{"login":"FdaSilvaYY","id":15791524,"avatar_url":"https://avatars.githubusercontent.com/u/15791524?v=3","gravatar_id":"","url":"https://api.github.com/users/FdaSilvaYY","html_url":"https://github.com/FdaSilvaYY","followers_url":"https://api.github.com/users/FdaSilvaYY/followers","following_url":"https://api.github.com/users/FdaSilvaYY/following{/other_user}","gists_url":"https://api.github.com/users/FdaSilvaYY/gists{/gist_id}","starred_url":"https://api.github.com/users/FdaSilvaYY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FdaSilvaYY/subscriptions","organizations_url":"https://api.github.com/users/FdaSilvaYY/orgs","repos_url":"https://api.github.com/users/FdaSilvaYY/repos","events_url":"https://api.github.com/users/FdaSilvaYY/events{/privacy}","received_events_url":"https://api.github.com/users/FdaSilvaYY/received_events","type":"User","site_admin":false},"body":"I remove a tedious change, who need more study.\r\nReady for review.","created_at":"2016-06-04T22:09:17Z","updated_at":"2016-07-01T08:50:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3afce4023aa1fb6d8614718a895cbfef90fdd4a8","assignee":{"login":"richsalz","id":7332500,"avatar_url":"https://avatars.githubusercontent.com/u/7332500?v=3","gravatar_id":"","url":"https://api.github.com/users/richsalz","html_url":"https://github.com/richsalz","followers_url":"https://api.github.com/users/richsalz/followers","following_url":"https://api.github.com/users/richsalz/following{/other_user}","gists_url":"https://api.github.com/users/richsalz/gists{/gist_id}","starred_url":"https://api.github.com/users/richsalz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richsalz/subscriptions","organizations_url":"https://api.github.com/users/richsalz/orgs","repos_url":"https://api.github.com/users/richsalz/repos","events_url":"https://api.github.com/users/richsalz/events{/privacy}","received_events_url":"https://api.github.com/users/richsalz/received_events","type":"User","site_admin":false},"assignees":[{"login":"richsalz","id":7332500,"avatar_url":"https://avatars.githubusercontent.com/u/7332500?v=3","gravatar_id":"","url":"https://api.github.com/users/richsalz","html_url":"https://github.com/richsalz","followers_url":"https://api.github.com/users/richsalz/followers","following_url":"https://api.github.com/users/richsalz/following{/other_user}","gists_url":"https://api.github.com/users/richsalz/gists{/gist_id}","starred_url":"https://api.github.com/users/richsalz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richsalz/subscriptions","organizations_url":"https://api.github.com/users/richsalz/orgs","repos_url":"https://api.github.com/users/richsalz/repos","events_url":"https://api.github.com/users/richsalz/events{/privacy}","received_events_url":"https://api.github.com/users/richsalz/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/openssl/openssl/milestones/1","html_url":"https://github.com/openssl/openssl/milestones/1.1.0","labels_url":"https://api.github.com/repos/openssl/openssl/milestones/1/labels","id":1748232,"number":1,"title":"1.1.0","description":"","creator":{"login":"levitte","id":698918,"avatar_url":"https://avatars.githubusercontent.com/u/698918?v=3","gravatar_id":"","url":"https://api.github.com/users/levitte","html_url":"https://github.com/levitte","followers_url":"https://api.github.com/users/levitte/followers","following_url":"https://api.github.com/users/levitte/following{/other_user}","gists_url":"https://api.github.com/users/levitte/gists{/gist_id}","starred_url":"https://api.github.com/users/levitte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/levitte/subscriptions","organizations_url":"https://api.github.com/users/levitte/orgs","repos_url":"https://api.github.com/users/levitte/repos","events_url":"https://api.github.com/users/levitte/events{/privacy}","received_events_url":"https://api.github.com/users/levitte/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":160,"state":"open","created_at":"2016-05-04T17:53:39Z","updated_at":"2016-07-01T08:35:32Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/openssl/openssl/pulls/1170/commits","review_comments_url":"https://api.github.com/repos/openssl/openssl/pulls/1170/comments","review_comment_url":"https://api.github.com/repos/openssl/openssl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openssl/openssl/issues/1170/comments","statuses_url":"https://api.github.com/repos/openssl/openssl/statuses/01dc89e460f2239c5776b8142a9a64ce2a8b6268","head":{"label":"FdaSilvaYY:crypto-add-checks-on-sk_type_push","ref":"crypto-add-checks-on-sk_type_push","sha":"01dc89e460f2239c5776b8142a9a64ce2a8b6268","user":{"login":"FdaSilvaYY","id":15791524,"avatar_url":"https://avatars.githubusercontent.com/u/15791524?v=3","gravatar_id":"","url":"https://api.github.com/users/FdaSilvaYY","html_url":"https://github.com/FdaSilvaYY","followers_url":"https://api.github.com/users/FdaSilvaYY/followers","following_url":"https://api.github.com/users/FdaSilvaYY/following{/other_user}","gists_url":"https://api.github.com/users/FdaSilvaYY/gists{/gist_id}","starred_url":"https://api.github.com/users/FdaSilvaYY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FdaSilvaYY/subscriptions","organizations_url":"https://api.github.com/users/FdaSilvaYY/orgs","repos_url":"https://api.github.com/users/FdaSilvaYY/repos","events_url":"https://api.github.com/users/FdaSilvaYY/events{/privacy}","received_events_url":"https://api.github.com/users/FdaSilvaYY/received_events","type":"User","site_admin":false},"repo":{"id":50681795,"name":"openssl","full_name":"FdaSilvaYY/openssl","owner":{"login":"FdaSilvaYY","id":15791524,"avatar_url":"https://avatars.githubusercontent.com/u/15791524?v=3","gravatar_id":"","url":"https://api.github.com/users/FdaSilvaYY","html_url":"https://github.com/FdaSilvaYY","followers_url":"https://api.github.com/users/FdaSilvaYY/followers","following_url":"https://api.github.com/users/FdaSilvaYY/following{/other_user}","gists_url":"https://api.github.com/users/FdaSilvaYY/gists{/gist_id}","starred_url":"https://api.github.com/users/FdaSilvaYY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FdaSilvaYY/subscriptions","organizations_url":"https://api.github.com/users/FdaSilvaYY/orgs","repos_url":"https://api.github.com/users/FdaSilvaYY/repos","events_url":"https://api.github.com/users/FdaSilvaYY/events{/privacy}","received_events_url":"https://api.github.com/users/FdaSilvaYY/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FdaSilvaYY/openssl","description":"TLS/SSL and crypto library","fork":true,"url":"https://api.github.com/repos/FdaSilvaYY/openssl","forks_url":"https://api.github.com/repos/FdaSilvaYY/openssl/forks","keys_url":"https://api.github.com/repos/FdaSilvaYY/openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FdaSilvaYY/openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FdaSilvaYY/openssl/teams","hooks_url":"https://api.github.com/repos/FdaSilvaYY/openssl/hooks","issue_events_url":"https://api.github.com/repos/FdaSilvaYY/openssl/issues/events{/number}","events_url":"https://api.github.com/repos/FdaSilvaYY/openssl/events","assignees_url":"https://api.github.com/repos/FdaSilvaYY/openssl/assignees{/user}","branches_url":"https://api.github.com/repos/FdaSilvaYY/openssl/branches{/branch}","tags_url":"https://api.github.com/repos/FdaSilvaYY/openssl/tags","blobs_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FdaSilvaYY/openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/FdaSilvaYY/openssl/languages","stargazers_url":"https://api.github.com/repos/FdaSilvaYY/openssl/stargazers","contributors_url":"https://api.github.com/repos/FdaSilvaYY/openssl/contributors","subscribers_url":"https://api.github.com/repos/FdaSilvaYY/openssl/subscribers","subscription_url":"https://api.github.com/repos/FdaSilvaYY/openssl/subscription","commits_url":"https://api.github.com/repos/FdaSilvaYY/openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/FdaSilvaYY/openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/FdaSilvaYY/openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/FdaSilvaYY/openssl/contents/{+path}","compare_url":"https://api.github.com/repos/FdaSilvaYY/openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FdaSilvaYY/openssl/merges","archive_url":"https://api.github.com/repos/FdaSilvaYY/openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FdaSilvaYY/openssl/downloads","issues_url":"https://api.github.com/repos/FdaSilvaYY/openssl/issues{/number}","pulls_url":"https://api.github.com/repos/FdaSilvaYY/openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/FdaSilvaYY/openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/FdaSilvaYY/openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FdaSilvaYY/openssl/labels{/name}","releases_url":"https://api.github.com/repos/FdaSilvaYY/openssl/releases{/id}","deployments_url":"https://api.github.com/repos/FdaSilvaYY/openssl/deployments","created_at":"2016-01-29T18:20:16Z","updated_at":"2016-01-29T18:20:27Z","pushed_at":"2016-06-29T22:20:15Z","git_url":"git://github.com/FdaSilvaYY/openssl.git","ssh_url":"git@github.com:FdaSilvaYY/openssl.git","clone_url":"https://github.com/FdaSilvaYY/openssl.git","svn_url":"https://github.com/FdaSilvaYY/openssl","homepage":"https://www.openssl.org","size":90674,"stargazers_count":0,"watchers_count":0,"language":"C","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":"openssl:master","ref":"master","sha":"6b4a77f56e14c002ce3cf960f622682be3b8424b","user":{"login":"openssl","id":3279138,"avatar_url":"https://avatars.githubusercontent.com/u/3279138?v=3","gravatar_id":"","url":"https://api.github.com/users/openssl","html_url":"https://github.com/openssl","followers_url":"https://api.github.com/users/openssl/followers","following_url":"https://api.github.com/users/openssl/following{/other_user}","gists_url":"https://api.github.com/users/openssl/gists{/gist_id}","starred_url":"https://api.github.com/users/openssl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openssl/subscriptions","organizations_url":"https://api.github.com/users/openssl/orgs","repos_url":"https://api.github.com/users/openssl/repos","events_url":"https://api.github.com/users/openssl/events{/privacy}","received_events_url":"https://api.github.com/users/openssl/received_events","type":"Organization","site_admin":false},"repo":{"id":7634677,"name":"openssl","full_name":"openssl/openssl","owner":{"login":"openssl","id":3279138,"avatar_url":"https://avatars.githubusercontent.com/u/3279138?v=3","gravatar_id":"","url":"https://api.github.com/users/openssl","html_url":"https://github.com/openssl","followers_url":"https://api.github.com/users/openssl/followers","following_url":"https://api.github.com/users/openssl/following{/other_user}","gists_url":"https://api.github.com/users/openssl/gists{/gist_id}","starred_url":"https://api.github.com/users/openssl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openssl/subscriptions","organizations_url":"https://api.github.com/users/openssl/orgs","repos_url":"https://api.github.com/users/openssl/repos","events_url":"https://api.github.com/users/openssl/events{/privacy}","received_events_url":"https://api.github.com/users/openssl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openssl/openssl","description":"TLS/SSL and crypto library","fork":false,"url":"https://api.github.com/repos/openssl/openssl","forks_url":"https://api.github.com/repos/openssl/openssl/forks","keys_url":"https://api.github.com/repos/openssl/openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openssl/openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openssl/openssl/teams","hooks_url":"https://api.github.com/repos/openssl/openssl/hooks","issue_events_url":"https://api.github.com/repos/openssl/openssl/issues/events{/number}","events_url":"https://api.github.com/repos/openssl/openssl/events","assignees_url":"https://api.github.com/repos/openssl/openssl/assignees{/user}","branches_url":"https://api.github.com/repos/openssl/openssl/branches{/branch}","tags_url":"https://api.github.com/repos/openssl/openssl/tags","blobs_url":"https://api.github.com/repos/openssl/openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openssl/openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openssl/openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/openssl/openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openssl/openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/openssl/openssl/languages","stargazers_url":"https://api.github.com/repos/openssl/openssl/stargazers","contributors_url":"https://api.github.com/repos/openssl/openssl/contributors","subscribers_url":"https://api.github.com/repos/openssl/openssl/subscribers","subscription_url":"https://api.github.com/repos/openssl/openssl/subscription","commits_url":"https://api.github.com/repos/openssl/openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/openssl/openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/openssl/openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/openssl/openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/openssl/openssl/contents/{+path}","compare_url":"https://api.github.com/repos/openssl/openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openssl/openssl/merges","archive_url":"https://api.github.com/repos/openssl/openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openssl/openssl/downloads","issues_url":"https://api.github.com/repos/openssl/openssl/issues{/number}","pulls_url":"https://api.github.com/repos/openssl/openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/openssl/openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/openssl/openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openssl/openssl/labels{/name}","releases_url":"https://api.github.com/repos/openssl/openssl/releases{/id}","deployments_url":"https://api.github.com/repos/openssl/openssl/deployments","created_at":"2013-01-15T22:34:48Z","updated_at":"2016-07-01T07:06:45Z","pushed_at":"2016-07-01T00:55:46Z","git_url":"git://github.com/openssl/openssl.git","ssh_url":"git@github.com:openssl/openssl.git","clone_url":"https://github.com/openssl/openssl.git","svn_url":"https://github.com/openssl/openssl","homepage":"https://www.openssl.org","size":111416,"stargazers_count":2826,"watchers_count":2826,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1624,"mirror_url":null,"open_issues_count":104,"forks":1624,"open_issues":104,"watchers":2826,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openssl/openssl/pulls/1170"},"html":{"href":"https://github.com/openssl/openssl/pull/1170"},"issue":{"href":"https://api.github.com/repos/openssl/openssl/issues/1170"},"comments":{"href":"https://api.github.com/repos/openssl/openssl/issues/1170/comments"},"review_comments":{"href":"https://api.github.com/repos/openssl/openssl/pulls/1170/comments"},"review_comment":{"href":"https://api.github.com/repos/openssl/openssl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openssl/openssl/pulls/1170/commits"},"statuses":{"href":"https://api.github.com/repos/openssl/openssl/statuses/01dc89e460f2239c5776b8142a9a64ce2a8b6268"}}}}
{"actor":{"display_login":"mattcaswell"}}