{"action":"created","comment":{"url":"https://api.github.com/repos/google/keytransparency/pulls/comments/176766105","pull_request_review_id":106531812,"id":176766105,"diff_hunk":"@@ -110,53 +111,52 @@ func (v *Verifier) VerifyGetEntryResponse(ctx context.Context, domainID, appID,\n \t\tnonce := in.GetCommitted().GetKey()\n \t\tif err := commitments.Verify(userID, appID, commitment, data, nonce); err != nil {\n \t\t\tVlog.Printf(\"✗ Commitment verification failed.\")\n-\t\t\treturn fmt.Errorf(\"commitments.Verify(%v, %v, %v, %v, %v): %v\", userID, appID, commitment, data, nonce, err)\n+\t\t\treturn nil, nil, fmt.Errorf(\"commitments.Verify(%v, %v, %v, %v, %v): %v\", userID, appID, commitment, data, nonce, err)\n \t\t}\n \t}\n \tVlog.Printf(\"✓ Commitment verified.\")\n \n \tindex, err := v.Index(in.GetVrfProof(), domainID, appID, userID)\n \tif err != nil {\n \t\tVlog.Printf(\"✗ VRF verification failed.\")\n-\t\treturn err\n+\t\treturn nil, nil, err\n \t}\n \tVlog.Printf(\"✓ VRF verified.\")\n \n \tleafProof := in.GetLeafProof()\n \tif leafProof.GetLeaf() == nil {\n-\t\treturn ErrNilProof\n+\t\treturn nil, nil, ErrNilProof\n \t}\n \tleafProof.Leaf.Index = index[:]\n \n-\tif err := v.mapVerifier.VerifyMapLeafInclusion(in.GetSmr(), leafProof); err != nil {\n-\t\tVlog.Printf(\"✗ Sparse tree proof verification failed.\")\n-\t\treturn err\n-\t}\n-\tVlog.Printf(\"✓ Sparse tree proof verified.\")\n-\n-\tif err := v.mapVerifier.VerifySignedMapRoot(in.GetSmr()); err != nil {\n+\tmapRoot, err := v.mapVerifier.VerifySignedMapRoot(in.GetSmr())\n+\tif err != nil {\n \t\tVlog.Printf(\"✗ Signed Map Head signature verification failed.\")\n-\t\treturn fmt.Errorf(\"VerifySignedMapRoot(): %v\", err)\n+\t\treturn nil, nil, fmt.Errorf(\"VerifySignedMapRoot(): %v\", err)\n \t}\n+\n \tVlog.Printf(\"✓ Signed Map Head signature verified.\")\n+\tif err := v.mapVerifier.VerifyMapLeafInclusion(mapRoot, leafProof); err != nil {\n+\t\tVlog.Printf(\"✗ Sparse tree proof verification failed.\")\n+\t\treturn nil, nil, fmt.Errorf(\"VerifyMapLeafInclusion(): %v\", err)\n+\t}\n+\tVlog.Printf(\"✓ Sparse tree proof verified.\")","path":"core/client/verify.go","position":null,"original_position":75,"commit_id":"aa3fa2bcc99be0912f7c686d33f17517e267bc1d","original_commit_id":"0039df17fd3c9d2df3e68b5f33d03a3bddd33140","user":{"login":"gdbelvin","id":198478,"avatar_url":"https://avatars1.githubusercontent.com/u/198478?v=4","gravatar_id":"","url":"https://api.github.com/users/gdbelvin","html_url":"https://github.com/gdbelvin","followers_url":"https://api.github.com/users/gdbelvin/followers","following_url":"https://api.github.com/users/gdbelvin/following{/other_user}","gists_url":"https://api.github.com/users/gdbelvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gdbelvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdbelvin/subscriptions","organizations_url":"https://api.github.com/users/gdbelvin/orgs","repos_url":"https://api.github.com/users/gdbelvin/repos","events_url":"https://api.github.com/users/gdbelvin/events{/privacy}","received_events_url":"https://api.github.com/users/gdbelvin/received_events","type":"User","site_admin":false},"body":"UTF-8 source code!","created_at":"2018-03-23T15:10:53Z","updated_at":"2018-03-23T15:10:53Z","html_url":"https://github.com/google/keytransparency/pull/950#discussion_r176766105","pull_request_url":"https://api.github.com/repos/google/keytransparency/pulls/950","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/google/keytransparency/pulls/comments/176766105"},"html":{"href":"https://github.com/google/keytransparency/pull/950#discussion_r176766105"},"pull_request":{"href":"https://api.github.com/repos/google/keytransparency/pulls/950"}},"in_reply_to_id":176714601},"pull_request":{"url":"https://api.github.com/repos/google/keytransparency/pulls/950","id":176789396,"html_url":"https://github.com/google/keytransparency/pull/950","diff_url":"https://github.com/google/keytransparency/pull/950.diff","patch_url":"https://github.com/google/keytransparency/pull/950.patch","issue_url":"https://api.github.com/repos/google/keytransparency/issues/950","number":950,"state":"open","locked":false,"title":"Use MapRootV1 in Key Transparency","user":{"login":"gdbelvin","id":198478,"avatar_url":"https://avatars1.githubusercontent.com/u/198478?v=4","gravatar_id":"","url":"https://api.github.com/users/gdbelvin","html_url":"https://github.com/gdbelvin","followers_url":"https://api.github.com/users/gdbelvin/followers","following_url":"https://api.github.com/users/gdbelvin/following{/other_user}","gists_url":"https://api.github.com/users/gdbelvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gdbelvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdbelvin/subscriptions","organizations_url":"https://api.github.com/users/gdbelvin/orgs","repos_url":"https://api.github.com/users/gdbelvin/repos","events_url":"https://api.github.com/users/gdbelvin/events{/privacy}","received_events_url":"https://api.github.com/users/gdbelvin/received_events","type":"User","site_admin":false},"body":"This catches up with Trillian. Follow on to #949.\r\n\r\nNow that `trillian.SignedMapRoot` does not directly expose fields, clients are (intentionally) forced to verify the signed map root before accessing it's fields.  This PR updates a few modules in KT to perform this verification where it was not happening before.\r\n\r\nChanges:\r\n-  Upgrade the `mutationclient` to verify `SignedMapRoot`s.  \r\n   - Move the mutationclient[1]  into `client` which has the `mapVerifier`\r\n      -  Autoconfiure the mutation client's poll period to be equal to the minimum delay between map revisions. \r\n- Helper methods for retrieving and verifying the latest signed map root.\r\n- Update test vectors.\r\n","created_at":"2018-03-22T14:07:15Z","updated_at":"2018-03-23T15:10:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a11d5775dcc74b707a02de962ca8bcabf3c457e1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/keytransparency/pulls/950/commits","review_comments_url":"https://api.github.com/repos/google/keytransparency/pulls/950/comments","review_comment_url":"https://api.github.com/repos/google/keytransparency/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/keytransparency/issues/950/comments","statuses_url":"https://api.github.com/repos/google/keytransparency/statuses/aa3fa2bcc99be0912f7c686d33f17517e267bc1d","head":{"label":"gdbelvin:catchup","ref":"catchup","sha":"aa3fa2bcc99be0912f7c686d33f17517e267bc1d","user":{"login":"gdbelvin","id":198478,"avatar_url":"https://avatars1.githubusercontent.com/u/198478?v=4","gravatar_id":"","url":"https://api.github.com/users/gdbelvin","html_url":"https://github.com/gdbelvin","followers_url":"https://api.github.com/users/gdbelvin/followers","following_url":"https://api.github.com/users/gdbelvin/following{/other_user}","gists_url":"https://api.github.com/users/gdbelvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gdbelvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdbelvin/subscriptions","organizations_url":"https://api.github.com/users/gdbelvin/orgs","repos_url":"https://api.github.com/users/gdbelvin/repos","events_url":"https://api.github.com/users/gdbelvin/events{/privacy}","received_events_url":"https://api.github.com/users/gdbelvin/received_events","type":"User","site_admin":false},"repo":{"id":79116210,"name":"keytransparency","full_name":"gdbelvin/keytransparency","owner":{"login":"gdbelvin","id":198478,"avatar_url":"https://avatars1.githubusercontent.com/u/198478?v=4","gravatar_id":"","url":"https://api.github.com/users/gdbelvin","html_url":"https://github.com/gdbelvin","followers_url":"https://api.github.com/users/gdbelvin/followers","following_url":"https://api.github.com/users/gdbelvin/following{/other_user}","gists_url":"https://api.github.com/users/gdbelvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gdbelvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdbelvin/subscriptions","organizations_url":"https://api.github.com/users/gdbelvin/orgs","repos_url":"https://api.github.com/users/gdbelvin/repos","events_url":"https://api.github.com/users/gdbelvin/events{/privacy}","received_events_url":"https://api.github.com/users/gdbelvin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gdbelvin/keytransparency","description":"A transparent and secure way to look up public keys.","fork":true,"url":"https://api.github.com/repos/gdbelvin/keytransparency","forks_url":"https://api.github.com/repos/gdbelvin/keytransparency/forks","keys_url":"https://api.github.com/repos/gdbelvin/keytransparency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gdbelvin/keytransparency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gdbelvin/keytransparency/teams","hooks_url":"https://api.github.com/repos/gdbelvin/keytransparency/hooks","issue_events_url":"https://api.github.com/repos/gdbelvin/keytransparency/issues/events{/number}","events_url":"https://api.github.com/repos/gdbelvin/keytransparency/events","assignees_url":"https://api.github.com/repos/gdbelvin/keytransparency/assignees{/user}","branches_url":"https://api.github.com/repos/gdbelvin/keytransparency/branches{/branch}","tags_url":"https://api.github.com/repos/gdbelvin/keytransparency/tags","blobs_url":"https://api.github.com/repos/gdbelvin/keytransparency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gdbelvin/keytransparency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gdbelvin/keytransparency/git/refs{/sha}","trees_url":"https://api.github.com/repos/gdbelvin/keytransparency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gdbelvin/keytransparency/statuses/{sha}","languages_url":"https://api.github.com/repos/gdbelvin/keytransparency/languages","stargazers_url":"https://api.github.com/repos/gdbelvin/keytransparency/stargazers","contributors_url":"https://api.github.com/repos/gdbelvin/keytransparency/contributors","subscribers_url":"https://api.github.com/repos/gdbelvin/keytransparency/subscribers","subscription_url":"https://api.github.com/repos/gdbelvin/keytransparency/subscription","commits_url":"https://api.github.com/repos/gdbelvin/keytransparency/commits{/sha}","git_commits_url":"https://api.github.com/repos/gdbelvin/keytransparency/git/commits{/sha}","comments_url":"https://api.github.com/repos/gdbelvin/keytransparency/comments{/number}","issue_comment_url":"https://api.github.com/repos/gdbelvin/keytransparency/issues/comments{/number}","contents_url":"https://api.github.com/repos/gdbelvin/keytransparency/contents/{+path}","compare_url":"https://api.github.com/repos/gdbelvin/keytransparency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gdbelvin/keytransparency/merges","archive_url":"https://api.github.com/repos/gdbelvin/keytransparency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gdbelvin/keytransparency/downloads","issues_url":"https://api.github.com/repos/gdbelvin/keytransparency/issues{/number}","pulls_url":"https://api.github.com/repos/gdbelvin/keytransparency/pulls{/number}","milestones_url":"https://api.github.com/repos/gdbelvin/keytransparency/milestones{/number}","notifications_url":"https://api.github.com/repos/gdbelvin/keytransparency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gdbelvin/keytransparency/labels{/name}","releases_url":"https://api.github.com/repos/gdbelvin/keytransparency/releases{/id}","deployments_url":"https://api.github.com/repos/gdbelvin/keytransparency/deployments","created_at":"2017-01-16T12:28:44Z","updated_at":"2018-03-22T10:42:32Z","pushed_at":"2018-03-23T14:26:11Z","git_url":"git://github.com/gdbelvin/keytransparency.git","ssh_url":"git@github.com:gdbelvin/keytransparency.git","clone_url":"https://github.com/gdbelvin/keytransparency.git","svn_url":"https://github.com/gdbelvin/keytransparency","homepage":"https://security.googleblog.com/2017/01/security-through-transparency.html","size":24728,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"0a2f9f864a49a661169967808f8397cc7cfaa1e8","user":{"login":"google","id":1342004,"avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":37165115,"name":"keytransparency","full_name":"google/keytransparency","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/keytransparency","description":"A transparent and secure way to look up public keys.","fork":false,"url":"https://api.github.com/repos/google/keytransparency","forks_url":"https://api.github.com/repos/google/keytransparency/forks","keys_url":"https://api.github.com/repos/google/keytransparency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/keytransparency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/keytransparency/teams","hooks_url":"https://api.github.com/repos/google/keytransparency/hooks","issue_events_url":"https://api.github.com/repos/google/keytransparency/issues/events{/number}","events_url":"https://api.github.com/repos/google/keytransparency/events","assignees_url":"https://api.github.com/repos/google/keytransparency/assignees{/user}","branches_url":"https://api.github.com/repos/google/keytransparency/branches{/branch}","tags_url":"https://api.github.com/repos/google/keytransparency/tags","blobs_url":"https://api.github.com/repos/google/keytransparency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/keytransparency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/keytransparency/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/keytransparency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/keytransparency/statuses/{sha}","languages_url":"https://api.github.com/repos/google/keytransparency/languages","stargazers_url":"https://api.github.com/repos/google/keytransparency/stargazers","contributors_url":"https://api.github.com/repos/google/keytransparency/contributors","subscribers_url":"https://api.github.com/repos/google/keytransparency/subscribers","subscription_url":"https://api.github.com/repos/google/keytransparency/subscription","commits_url":"https://api.github.com/repos/google/keytransparency/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/keytransparency/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/keytransparency/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/keytransparency/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/keytransparency/contents/{+path}","compare_url":"https://api.github.com/repos/google/keytransparency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/keytransparency/merges","archive_url":"https://api.github.com/repos/google/keytransparency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/keytransparency/downloads","issues_url":"https://api.github.com/repos/google/keytransparency/issues{/number}","pulls_url":"https://api.github.com/repos/google/keytransparency/pulls{/number}","milestones_url":"https://api.github.com/repos/google/keytransparency/milestones{/number}","notifications_url":"https://api.github.com/repos/google/keytransparency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/keytransparency/labels{/name}","releases_url":"https://api.github.com/repos/google/keytransparency/releases{/id}","deployments_url":"https://api.github.com/repos/google/keytransparency/deployments","created_at":"2015-06-09T23:55:20Z","updated_at":"2018-03-23T10:06:12Z","pushed_at":"2018-03-23T14:26:12Z","git_url":"git://github.com/google/keytransparency.git","ssh_url":"git@github.com:google/keytransparency.git","clone_url":"https://github.com/google/keytransparency.git","svn_url":"https://github.com/google/keytransparency","homepage":"https://security.googleblog.com/2017/01/security-through-transparency.html","size":23208,"stargazers_count":1235,"watchers_count":1235,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":89,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":89,"open_issues":65,"watchers":1235,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/keytransparency/pulls/950"},"html":{"href":"https://github.com/google/keytransparency/pull/950"},"issue":{"href":"https://api.github.com/repos/google/keytransparency/issues/950"},"comments":{"href":"https://api.github.com/repos/google/keytransparency/issues/950/comments"},"review_comments":{"href":"https://api.github.com/repos/google/keytransparency/pulls/950/comments"},"review_comment":{"href":"https://api.github.com/repos/google/keytransparency/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/keytransparency/pulls/950/commits"},"statuses":{"href":"https://api.github.com/repos/google/keytransparency/statuses/aa3fa2bcc99be0912f7c686d33f17517e267bc1d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gdbelvin"}}