{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/client/pulls/comments/48632141","id":48632141,"diff_hunk":"@@ -40,21 +43,95 @@ func (e *SaltPackDecrypt) Prereqs() Prereqs {\n \n // RequiredUIs returns the required UIs.\n func (e *SaltPackDecrypt) RequiredUIs() []libkb.UIKind {\n-\treturn nil\n+\treturn []libkb.UIKind{\n+\t\tlibkb.SaltPackUIKind,\n+\t}\n }\n \n // SubConsumers returns the other UI consumers for this engine.\n func (e *SaltPackDecrypt) SubConsumers() []libkb.UIConsumer {\n-\treturn []libkb.UIConsumer{}\n+\treturn []libkb.UIConsumer{\n+\t\t&Identify2WithUID{},\n+\t}\n+}\n+\n+func (e *SaltPackDecrypt) lookupSender(ctx *Context, mki *saltpack.MessageKeyInfo, arg *keybase1.SaltPackPromptForDecryptArg) (err error) {\n+\tdefer e.G().Trace(\"SaltPackDecrypt::lookupSender\", func() error { return err })()\n+\targ.Username, arg.Uid, err = libkb.KeyLookupByBoxPublicKey(e.G(), mki.SenderKey)\n+\treturn err\n+}\n+\n+func (e *SaltPackDecrypt) identifySender(ctx *Context, arg *keybase1.SaltPackPromptForDecryptArg) (err error) {\n+\tdefer e.G().Trace(\"SaltPackDecrypt::identifySender\", func() error { return err })()\n+\tiarg := keybase1.Identify2Arg{\n+\t\tUid:                   arg.Uid,\n+\t\tUseDelegateUI:         !e.arg.Opts.Interactive,\n+\t\tAlwaysBlock:           e.arg.Opts.Interactive,\n+\t\tForceRemoteCheck:      e.arg.Opts.ForceRemoteCheck,\n+\t\tNoErrorOnTrackFailure: true,\n+\t\tReason: keybase1.IdentifyReason{\n+\t\t\tReason: \"Identify who encrypted this message\",\n+\t\t\tType:   keybase1.IdentifyReasonType_DECRYPT,\n+\t\t},\n+\t}\n+\teng := NewIdentify2WithUID(e.G(), &iarg)\n+\tif err = eng.Run(ctx); err != nil {\n+\t\treturn err\n+\t}\n+\tswitch eng.getTrackType() {\n+\tcase identify2NoTrack:\n+\t\targ.SenderType = keybase1.SaltPackSenderType_NOT_TRACKED\n+\tcase identify2TrackOK:\n+\t\targ.SenderType = keybase1.SaltPackSenderType_TRACKING_OK\n+\tdefault:\n+\t\targ.SenderType = keybase1.SaltPackSenderType_TRACKING_BROKE\n+\t}\n+\treturn nil\n+}","path":"go/engine/saltpack_decrypt.go","position":70,"original_position":70,"commit_id":"f87d23b2491b92f5307acc7a54b9633af7813248","original_commit_id":"f87d23b2491b92f5307acc7a54b9633af7813248","user":{"login":"patrickxb","id":2508,"avatar_url":"https://avatars.githubusercontent.com/u/2508?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickxb","html_url":"https://github.com/patrickxb","followers_url":"https://api.github.com/users/patrickxb/followers","following_url":"https://api.github.com/users/patrickxb/following{/other_user}","gists_url":"https://api.github.com/users/patrickxb/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickxb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickxb/subscriptions","organizations_url":"https://api.github.com/users/patrickxb/orgs","repos_url":"https://api.github.com/users/patrickxb/repos","events_url":"https://api.github.com/users/patrickxb/events{/privacy}","received_events_url":"https://api.github.com/users/patrickxb/received_events","type":"User","site_admin":false},"body":"ok, sounds good.","created_at":"2015-12-30T21:18:15Z","updated_at":"2015-12-30T21:18:15Z","html_url":"https://github.com/keybase/client/pull/1613#discussion_r48632141","pull_request_url":"https://api.github.com/repos/keybase/client/pulls/1613","_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/comments/48632141"},"html":{"href":"https://github.com/keybase/client/pull/1613#discussion_r48632141"},"pull_request":{"href":"https://api.github.com/repos/keybase/client/pulls/1613"}}},"pull_request":{"url":"https://api.github.com/repos/keybase/client/pulls/1613","id":54821386,"html_url":"https://github.com/keybase/client/pull/1613","diff_url":"https://github.com/keybase/client/pull/1613.diff","patch_url":"https://github.com/keybase/client/pull/1613.patch","issue_url":"https://api.github.com/repos/keybase/client/issues/1613","number":1613,"state":"open","locked":false,"title":"saltpack: decryption U/I for sender identification","user":{"login":"maxtaco","id":866815,"avatar_url":"https://avatars.githubusercontent.com/u/866815?v=3","gravatar_id":"","url":"https://api.github.com/users/maxtaco","html_url":"https://github.com/maxtaco","followers_url":"https://api.github.com/users/maxtaco/followers","following_url":"https://api.github.com/users/maxtaco/following{/other_user}","gists_url":"https://api.github.com/users/maxtaco/gists{/gist_id}","starred_url":"https://api.github.com/users/maxtaco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxtaco/subscriptions","organizations_url":"https://api.github.com/users/maxtaco/orgs","repos_url":"https://api.github.com/users/maxtaco/repos","events_url":"https://api.github.com/users/maxtaco/events{/privacy}","received_events_url":"https://api.github.com/users/maxtaco/received_events","type":"User","site_admin":false},"body":"- decryption UI plumbed through\r\n- clean up use of identify UI\r\n  - change the Start() function to say why the identification is happening. We're going to\r\n    need this anyways, for KBFS integrations.\r\n- fix the blocking semantics needed for id2 use in --interactive mode\r\n- more tests for decryption conditions","created_at":"2015-12-30T18:58:28Z","updated_at":"2015-12-30T21:18:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a9a7605a36b2d57f1f976a966e0e5b9dc042ba7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/keybase/client/pulls/1613/commits","review_comments_url":"https://api.github.com/repos/keybase/client/pulls/1613/comments","review_comment_url":"https://api.github.com/repos/keybase/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/client/issues/1613/comments","statuses_url":"https://api.github.com/repos/keybase/client/statuses/f87d23b2491b92f5307acc7a54b9633af7813248","head":{"label":"keybase:maxtaco/CORE-2155","ref":"maxtaco/CORE-2155","sha":"f87d23b2491b92f5307acc7a54b9633af7813248","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","created_at":"2015-01-11T17:17:12Z","updated_at":"2015-12-30T19:36:44Z","pushed_at":"2015-12-30T21:17:18Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":122136,"stargazers_count":49,"watchers_count":49,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":27,"forks":5,"open_issues":27,"watchers":49,"default_branch":"master"}},"base":{"label":"keybase:master","ref":"master","sha":"7f65f691501e2849d72f5bb5dab429ed1551b971","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","created_at":"2015-01-11T17:17:12Z","updated_at":"2015-12-30T19:36:44Z","pushed_at":"2015-12-30T21:17:18Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":122136,"stargazers_count":49,"watchers_count":49,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":27,"forks":5,"open_issues":27,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/1613"},"html":{"href":"https://github.com/keybase/client/pull/1613"},"issue":{"href":"https://api.github.com/repos/keybase/client/issues/1613"},"comments":{"href":"https://api.github.com/repos/keybase/client/issues/1613/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/client/pulls/1613/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/client/pulls/1613/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/client/statuses/f87d23b2491b92f5307acc7a54b9633af7813248"}}}}