{"action":"created","comment":{"url":"https://api.github.com/repos/mono/mono/pulls/comments/110934485","pull_request_review_id":32137903,"id":110934485,"diff_hunk":"@@ -331,7 +361,67 @@ public void Dispose ()\n \n \t\tprotected virtual void Dispose (bool disposing)\n \t\t{\n-\t\t\tif (handle != IntPtr.Zero){\n+\t\t\tif (owner != IntPtr.Zero) {\n+\t\t\t\tCFObject.CFRelease (owner);\n+\t\t\t\towner = handle = IntPtr.Zero;\n+\t\t\t} else if (handle != IntPtr.Zero) {\n+\t\t\t\tCFObject.CFRelease (handle);\n+\t\t\t\thandle = IntPtr.Zero;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tclass SecAccess : INativeObject, IDisposable {\n+\t\tinternal IntPtr handle;\n+\n+\t\tpublic SecAccess (IntPtr handle, bool owns = false)\n+\t\t{\n+\t\t\tthis.handle = handle;\n+\t\t\tif (!owns)\n+\t\t\t\tCFObject.CFRetain (handle);\n+\t\t}\n+\n+\t\t~SecAccess ()\n+\t\t{\n+\t\t\tDispose (false);\n+\t\t}\n+\n+\t\tpublic IntPtr Handle {\n+\t\t\tget {\n+\t\t\t\treturn handle;\n+\t\t\t}\n+\t\t}\n+\n+\t\t[DllImport (AppleTlsContext.SecurityLibrary)]\n+\t\textern static /* OSStatus */ SecStatusCode SecAccessCreate (/* CFStringRef */ IntPtr descriptor,  /* CFArrayRef */ IntPtr trustedList, /* SecAccessRef _Nullable * */ out IntPtr accessRef);\n+\n+\t\tpublic static SecAccess Create (string descriptor)\n+\t\t{\n+\t\t\tvar descriptorHandle = CFString.Create (descriptor);\n+\t\t\tif (descriptorHandle == null)\n+\t\t\t\tthrow new InvalidOperationException ();","path":"mcs/class/System/Mono.AppleTls/Certificate.cs","position":143,"original_position":143,"commit_id":"d051ed2ebbc0e95146740f4f7a7e6ff91683236b","original_commit_id":"d051ed2ebbc0e95146740f4f7a7e6ff91683236b","user":{"login":"chamons","id":6392201,"avatar_url":"https://avatars3.githubusercontent.com/u/6392201?v=3","gravatar_id":"","url":"https://api.github.com/users/chamons","html_url":"https://github.com/chamons","followers_url":"https://api.github.com/users/chamons/followers","following_url":"https://api.github.com/users/chamons/following{/other_user}","gists_url":"https://api.github.com/users/chamons/gists{/gist_id}","starred_url":"https://api.github.com/users/chamons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamons/subscriptions","organizations_url":"https://api.github.com/users/chamons/orgs","repos_url":"https://api.github.com/users/chamons/repos","events_url":"https://api.github.com/users/chamons/events{/privacy}","received_events_url":"https://api.github.com/users/chamons/received_events","type":"User","site_admin":false},"body":"Is this the right exception?","created_at":"2017-04-11T15:29:17Z","updated_at":"2017-04-11T15:33:35Z","html_url":"https://github.com/mono/mono/pull/4671#discussion_r110934485","pull_request_url":"https://api.github.com/repos/mono/mono/pulls/4671","_links":{"self":{"href":"https://api.github.com/repos/mono/mono/pulls/comments/110934485"},"html":{"href":"https://github.com/mono/mono/pull/4671#discussion_r110934485"},"pull_request":{"href":"https://api.github.com/repos/mono/mono/pulls/4671"}}},"pull_request":{"url":"https://api.github.com/repos/mono/mono/pulls/4671","id":115342297,"html_url":"https://github.com/mono/mono/pull/4671","diff_url":"https://github.com/mono/mono/pull/4671.diff","patch_url":"https://github.com/mono/mono/pull/4671.patch","issue_url":"https://api.github.com/repos/mono/mono/issues/4671","number":4671,"state":"open","locked":false,"title":"[appletls]: Use SecIdentityCreate() to avoid using the Mac keychain.","user":{"login":"baulig","id":346113,"avatar_url":"https://avatars1.githubusercontent.com/u/346113?v=3","gravatar_id":"","url":"https://api.github.com/users/baulig","html_url":"https://github.com/baulig","followers_url":"https://api.github.com/users/baulig/followers","following_url":"https://api.github.com/users/baulig/following{/other_user}","gists_url":"https://api.github.com/users/baulig/gists{/gist_id}","starred_url":"https://api.github.com/users/baulig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baulig/subscriptions","organizations_url":"https://api.github.com/users/baulig/orgs","repos_url":"https://api.github.com/users/baulig/repos","events_url":"https://api.github.com/users/baulig/events{/privacy}","received_events_url":"https://api.github.com/users/baulig/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-04-11T15:01:32Z","updated_at":"2017-04-11T15:33:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43b8ccc346f14aaa63cdd6d07a806c351c1500a2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mono/mono/pulls/4671/commits","review_comments_url":"https://api.github.com/repos/mono/mono/pulls/4671/comments","review_comment_url":"https://api.github.com/repos/mono/mono/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mono/mono/issues/4671/comments","statuses_url":"https://api.github.com/repos/mono/mono/statuses/d051ed2ebbc0e95146740f4f7a7e6ff91683236b","head":{"label":"mono:work-appletls-keychain-landing","ref":"work-appletls-keychain-landing","sha":"d051ed2ebbc0e95146740f4f7a7e6ff91683236b","user":{"login":"mono","id":53395,"avatar_url":"https://avatars0.githubusercontent.com/u/53395?v=3","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"repo":{"id":791611,"name":"mono","full_name":"mono/mono","owner":{"login":"mono","id":53395,"avatar_url":"https://avatars0.githubusercontent.com/u/53395?v=3","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mono/mono","description":"Mono open source ECMA CLI, C# and .NET implementation.","fork":false,"url":"https://api.github.com/repos/mono/mono","forks_url":"https://api.github.com/repos/mono/mono/forks","keys_url":"https://api.github.com/repos/mono/mono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mono/mono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mono/mono/teams","hooks_url":"https://api.github.com/repos/mono/mono/hooks","issue_events_url":"https://api.github.com/repos/mono/mono/issues/events{/number}","events_url":"https://api.github.com/repos/mono/mono/events","assignees_url":"https://api.github.com/repos/mono/mono/assignees{/user}","branches_url":"https://api.github.com/repos/mono/mono/branches{/branch}","tags_url":"https://api.github.com/repos/mono/mono/tags","blobs_url":"https://api.github.com/repos/mono/mono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mono/mono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mono/mono/git/refs{/sha}","trees_url":"https://api.github.com/repos/mono/mono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mono/mono/statuses/{sha}","languages_url":"https://api.github.com/repos/mono/mono/languages","stargazers_url":"https://api.github.com/repos/mono/mono/stargazers","contributors_url":"https://api.github.com/repos/mono/mono/contributors","subscribers_url":"https://api.github.com/repos/mono/mono/subscribers","subscription_url":"https://api.github.com/repos/mono/mono/subscription","commits_url":"https://api.github.com/repos/mono/mono/commits{/sha}","git_commits_url":"https://api.github.com/repos/mono/mono/git/commits{/sha}","comments_url":"https://api.github.com/repos/mono/mono/comments{/number}","issue_comment_url":"https://api.github.com/repos/mono/mono/issues/comments{/number}","contents_url":"https://api.github.com/repos/mono/mono/contents/{+path}","compare_url":"https://api.github.com/repos/mono/mono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mono/mono/merges","archive_url":"https://api.github.com/repos/mono/mono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mono/mono/downloads","issues_url":"https://api.github.com/repos/mono/mono/issues{/number}","pulls_url":"https://api.github.com/repos/mono/mono/pulls{/number}","milestones_url":"https://api.github.com/repos/mono/mono/milestones{/number}","notifications_url":"https://api.github.com/repos/mono/mono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mono/mono/labels{/name}","releases_url":"https://api.github.com/repos/mono/mono/releases{/id}","deployments_url":"https://api.github.com/repos/mono/mono/deployments","created_at":"2010-07-22T18:06:36Z","updated_at":"2017-04-11T12:12:13Z","pushed_at":"2017-04-11T15:01:33Z","git_url":"git://github.com/mono/mono.git","ssh_url":"git@github.com:mono/mono.git","clone_url":"https://github.com/mono/mono.git","svn_url":"https://github.com/mono/mono","homepage":"http://www.mono-project.com/","size":443861,"stargazers_count":5403,"watchers_count":5403,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2554,"mirror_url":null,"open_issues_count":150,"forks":2554,"open_issues":150,"watchers":5403,"default_branch":"master"}},"base":{"label":"mono:master","ref":"master","sha":"afb392a0790b69697de561a9f4babb22aa667dee","user":{"login":"mono","id":53395,"avatar_url":"https://avatars0.githubusercontent.com/u/53395?v=3","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"repo":{"id":791611,"name":"mono","full_name":"mono/mono","owner":{"login":"mono","id":53395,"avatar_url":"https://avatars0.githubusercontent.com/u/53395?v=3","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mono/mono","description":"Mono open source ECMA CLI, C# and .NET implementation.","fork":false,"url":"https://api.github.com/repos/mono/mono","forks_url":"https://api.github.com/repos/mono/mono/forks","keys_url":"https://api.github.com/repos/mono/mono/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mono/mono/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mono/mono/teams","hooks_url":"https://api.github.com/repos/mono/mono/hooks","issue_events_url":"https://api.github.com/repos/mono/mono/issues/events{/number}","events_url":"https://api.github.com/repos/mono/mono/events","assignees_url":"https://api.github.com/repos/mono/mono/assignees{/user}","branches_url":"https://api.github.com/repos/mono/mono/branches{/branch}","tags_url":"https://api.github.com/repos/mono/mono/tags","blobs_url":"https://api.github.com/repos/mono/mono/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mono/mono/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mono/mono/git/refs{/sha}","trees_url":"https://api.github.com/repos/mono/mono/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mono/mono/statuses/{sha}","languages_url":"https://api.github.com/repos/mono/mono/languages","stargazers_url":"https://api.github.com/repos/mono/mono/stargazers","contributors_url":"https://api.github.com/repos/mono/mono/contributors","subscribers_url":"https://api.github.com/repos/mono/mono/subscribers","subscription_url":"https://api.github.com/repos/mono/mono/subscription","commits_url":"https://api.github.com/repos/mono/mono/commits{/sha}","git_commits_url":"https://api.github.com/repos/mono/mono/git/commits{/sha}","comments_url":"https://api.github.com/repos/mono/mono/comments{/number}","issue_comment_url":"https://api.github.com/repos/mono/mono/issues/comments{/number}","contents_url":"https://api.github.com/repos/mono/mono/contents/{+path}","compare_url":"https://api.github.com/repos/mono/mono/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mono/mono/merges","archive_url":"https://api.github.com/repos/mono/mono/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mono/mono/downloads","issues_url":"https://api.github.com/repos/mono/mono/issues{/number}","pulls_url":"https://api.github.com/repos/mono/mono/pulls{/number}","milestones_url":"https://api.github.com/repos/mono/mono/milestones{/number}","notifications_url":"https://api.github.com/repos/mono/mono/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mono/mono/labels{/name}","releases_url":"https://api.github.com/repos/mono/mono/releases{/id}","deployments_url":"https://api.github.com/repos/mono/mono/deployments","created_at":"2010-07-22T18:06:36Z","updated_at":"2017-04-11T12:12:13Z","pushed_at":"2017-04-11T15:01:33Z","git_url":"git://github.com/mono/mono.git","ssh_url":"git@github.com:mono/mono.git","clone_url":"https://github.com/mono/mono.git","svn_url":"https://github.com/mono/mono","homepage":"http://www.mono-project.com/","size":443861,"stargazers_count":5403,"watchers_count":5403,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2554,"mirror_url":null,"open_issues_count":150,"forks":2554,"open_issues":150,"watchers":5403,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mono/mono/pulls/4671"},"html":{"href":"https://github.com/mono/mono/pull/4671"},"issue":{"href":"https://api.github.com/repos/mono/mono/issues/4671"},"comments":{"href":"https://api.github.com/repos/mono/mono/issues/4671/comments"},"review_comments":{"href":"https://api.github.com/repos/mono/mono/pulls/4671/comments"},"review_comment":{"href":"https://api.github.com/repos/mono/mono/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mono/mono/pulls/4671/commits"},"statuses":{"href":"https://api.github.com/repos/mono/mono/statuses/d051ed2ebbc0e95146740f4f7a7e6ff91683236b"}}}}
{"actor":{"display_login":"chamons"}}