{"action":"created","comment":{"url":"https://api.github.com/repos/iclab/centinel/pulls/comments/33635593","id":33635593,"diff_hunk":"@@ -22,6 +23,11 @@ def get_fingerprint(host, port=443, external=None):\n         tls_error = str(exp)\n         exception = exp\n \n+    # this comes out as unicode, but m2crypto breaks if it gets\n+    # something other than a string, so convert to ascii\n+    if type(cert) == unicode or test:","path":"centinel/primitives/tls.py","position":14,"original_position":14,"commit_id":"c84bdbc02f26142164b95db352e1a4e155088e2f","original_commit_id":"c84bdbc02f26142164b95db352e1a4e155088e2f","user":{"login":"rpanah","id":6577290,"avatar_url":"https://avatars.githubusercontent.com/u/6577290?v=3","gravatar_id":"","url":"https://api.github.com/users/rpanah","html_url":"https://github.com/rpanah","followers_url":"https://api.github.com/users/rpanah/followers","following_url":"https://api.github.com/users/rpanah/following{/other_user}","gists_url":"https://api.github.com/users/rpanah/gists{/gist_id}","starred_url":"https://api.github.com/users/rpanah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpanah/subscriptions","organizations_url":"https://api.github.com/users/rpanah/orgs","repos_url":"https://api.github.com/users/rpanah/repos","events_url":"https://api.github.com/users/rpanah/events{/privacy}","received_events_url":"https://api.github.com/users/rpanah/received_events","type":"User","site_admin":false},"body":"@ben-jones `or test:`? What does this part do? It will throw an exception if `test` is not declared.","created_at":"2015-06-30T23:28:53Z","updated_at":"2015-06-30T23:28:53Z","html_url":"https://github.com/iclab/centinel/pull/144#discussion_r33635593","pull_request_url":"https://api.github.com/repos/iclab/centinel/pulls/144","_links":{"self":{"href":"https://api.github.com/repos/iclab/centinel/pulls/comments/33635593"},"html":{"href":"https://github.com/iclab/centinel/pull/144#discussion_r33635593"},"pull_request":{"href":"https://api.github.com/repos/iclab/centinel/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/iclab/centinel/pulls/144","id":38935042,"html_url":"https://github.com/iclab/centinel/pull/144","diff_url":"https://github.com/iclab/centinel/pull/144.diff","patch_url":"https://github.com/iclab/centinel/pull/144.patch","issue_url":"https://api.github.com/repos/iclab/centinel/issues/144","number":144,"state":"open","locked":false,"title":"fixed 2 bugs in tls primitive","user":{"login":"ben-jones","id":5179103,"avatar_url":"https://avatars.githubusercontent.com/u/5179103?v=3","gravatar_id":"","url":"https://api.github.com/users/ben-jones","html_url":"https://github.com/ben-jones","followers_url":"https://api.github.com/users/ben-jones/followers","following_url":"https://api.github.com/users/ben-jones/following{/other_user}","gists_url":"https://api.github.com/users/ben-jones/gists{/gist_id}","starred_url":"https://api.github.com/users/ben-jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ben-jones/subscriptions","organizations_url":"https://api.github.com/users/ben-jones/orgs","repos_url":"https://api.github.com/users/ben-jones/repos","events_url":"https://api.github.com/users/ben-jones/events{/privacy}","received_events_url":"https://api.github.com/users/ben-jones/received_events","type":"User","site_admin":false},"body":"1) fixed a bug in the tls primitive where we were using a variable\r\nthat had never been declared\r\n\r\n2) the m2crypto library needs an str as input to the X509 parsing\r\nfunction, but the SSL library oftens returns a unicode string. If\r\nthe cert comes back as unicode, we encode it as ascii and return\r\n\r\n@rpanah, please review or assign someone else to review","created_at":"2015-06-30T23:23:24Z","updated_at":"2015-06-30T23:28:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e85a7f1b4ac5449e1a40ee4b60e353f7a14cacfd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/iclab/centinel/pulls/144/commits","review_comments_url":"https://api.github.com/repos/iclab/centinel/pulls/144/comments","review_comment_url":"https://api.github.com/repos/iclab/centinel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iclab/centinel/issues/144/comments","statuses_url":"https://api.github.com/repos/iclab/centinel/statuses/c84bdbc02f26142164b95db352e1a4e155088e2f","head":{"label":"ben-jones:fix_tls","ref":"fix_tls","sha":"c84bdbc02f26142164b95db352e1a4e155088e2f","user":{"login":"ben-jones","id":5179103,"avatar_url":"https://avatars.githubusercontent.com/u/5179103?v=3","gravatar_id":"","url":"https://api.github.com/users/ben-jones","html_url":"https://github.com/ben-jones","followers_url":"https://api.github.com/users/ben-jones/followers","following_url":"https://api.github.com/users/ben-jones/following{/other_user}","gists_url":"https://api.github.com/users/ben-jones/gists{/gist_id}","starred_url":"https://api.github.com/users/ben-jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ben-jones/subscriptions","organizations_url":"https://api.github.com/users/ben-jones/orgs","repos_url":"https://api.github.com/users/ben-jones/repos","events_url":"https://api.github.com/users/ben-jones/events{/privacy}","received_events_url":"https://api.github.com/users/ben-jones/received_events","type":"User","site_admin":false},"repo":{"id":21007235,"name":"centinel","full_name":"ben-jones/centinel","owner":{"login":"ben-jones","id":5179103,"avatar_url":"https://avatars.githubusercontent.com/u/5179103?v=3","gravatar_id":"","url":"https://api.github.com/users/ben-jones","html_url":"https://github.com/ben-jones","followers_url":"https://api.github.com/users/ben-jones/followers","following_url":"https://api.github.com/users/ben-jones/following{/other_user}","gists_url":"https://api.github.com/users/ben-jones/gists{/gist_id}","starred_url":"https://api.github.com/users/ben-jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ben-jones/subscriptions","organizations_url":"https://api.github.com/users/ben-jones/orgs","repos_url":"https://api.github.com/users/ben-jones/repos","events_url":"https://api.github.com/users/ben-jones/events{/privacy}","received_events_url":"https://api.github.com/users/ben-jones/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ben-jones/centinel","description":"","fork":true,"url":"https://api.github.com/repos/ben-jones/centinel","forks_url":"https://api.github.com/repos/ben-jones/centinel/forks","keys_url":"https://api.github.com/repos/ben-jones/centinel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ben-jones/centinel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ben-jones/centinel/teams","hooks_url":"https://api.github.com/repos/ben-jones/centinel/hooks","issue_events_url":"https://api.github.com/repos/ben-jones/centinel/issues/events{/number}","events_url":"https://api.github.com/repos/ben-jones/centinel/events","assignees_url":"https://api.github.com/repos/ben-jones/centinel/assignees{/user}","branches_url":"https://api.github.com/repos/ben-jones/centinel/branches{/branch}","tags_url":"https://api.github.com/repos/ben-jones/centinel/tags","blobs_url":"https://api.github.com/repos/ben-jones/centinel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ben-jones/centinel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ben-jones/centinel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ben-jones/centinel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ben-jones/centinel/statuses/{sha}","languages_url":"https://api.github.com/repos/ben-jones/centinel/languages","stargazers_url":"https://api.github.com/repos/ben-jones/centinel/stargazers","contributors_url":"https://api.github.com/repos/ben-jones/centinel/contributors","subscribers_url":"https://api.github.com/repos/ben-jones/centinel/subscribers","subscription_url":"https://api.github.com/repos/ben-jones/centinel/subscription","commits_url":"https://api.github.com/repos/ben-jones/centinel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ben-jones/centinel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ben-jones/centinel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ben-jones/centinel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ben-jones/centinel/contents/{+path}","compare_url":"https://api.github.com/repos/ben-jones/centinel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ben-jones/centinel/merges","archive_url":"https://api.github.com/repos/ben-jones/centinel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ben-jones/centinel/downloads","issues_url":"https://api.github.com/repos/ben-jones/centinel/issues{/number}","pulls_url":"https://api.github.com/repos/ben-jones/centinel/pulls{/number}","milestones_url":"https://api.github.com/repos/ben-jones/centinel/milestones{/number}","notifications_url":"https://api.github.com/repos/ben-jones/centinel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ben-jones/centinel/labels{/name}","releases_url":"https://api.github.com/repos/ben-jones/centinel/releases{/id}","created_at":"2014-06-19T16:23:00Z","updated_at":"2014-07-12T00:24:53Z","pushed_at":"2015-06-30T23:21:37Z","git_url":"git://github.com/ben-jones/centinel.git","ssh_url":"git@github.com:ben-jones/centinel.git","clone_url":"https://github.com/ben-jones/centinel.git","svn_url":"https://github.com/ben-jones/centinel","homepage":null,"size":826,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"iclab:master","ref":"master","sha":"71b27a9a2904a9afa5c064bf8876e5db3ce92b5a","user":{"login":"iclab","id":7266039,"avatar_url":"https://avatars.githubusercontent.com/u/7266039?v=3","gravatar_id":"","url":"https://api.github.com/users/iclab","html_url":"https://github.com/iclab","followers_url":"https://api.github.com/users/iclab/followers","following_url":"https://api.github.com/users/iclab/following{/other_user}","gists_url":"https://api.github.com/users/iclab/gists{/gist_id}","starred_url":"https://api.github.com/users/iclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iclab/subscriptions","organizations_url":"https://api.github.com/users/iclab/orgs","repos_url":"https://api.github.com/users/iclab/repos","events_url":"https://api.github.com/users/iclab/events{/privacy}","received_events_url":"https://api.github.com/users/iclab/received_events","type":"Organization","site_admin":false},"repo":{"id":19478974,"name":"centinel","full_name":"iclab/centinel","owner":{"login":"iclab","id":7266039,"avatar_url":"https://avatars.githubusercontent.com/u/7266039?v=3","gravatar_id":"","url":"https://api.github.com/users/iclab","html_url":"https://github.com/iclab","followers_url":"https://api.github.com/users/iclab/followers","following_url":"https://api.github.com/users/iclab/following{/other_user}","gists_url":"https://api.github.com/users/iclab/gists{/gist_id}","starred_url":"https://api.github.com/users/iclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iclab/subscriptions","organizations_url":"https://api.github.com/users/iclab/orgs","repos_url":"https://api.github.com/users/iclab/repos","events_url":"https://api.github.com/users/iclab/events{/privacy}","received_events_url":"https://api.github.com/users/iclab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iclab/centinel","description":"","fork":false,"url":"https://api.github.com/repos/iclab/centinel","forks_url":"https://api.github.com/repos/iclab/centinel/forks","keys_url":"https://api.github.com/repos/iclab/centinel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iclab/centinel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iclab/centinel/teams","hooks_url":"https://api.github.com/repos/iclab/centinel/hooks","issue_events_url":"https://api.github.com/repos/iclab/centinel/issues/events{/number}","events_url":"https://api.github.com/repos/iclab/centinel/events","assignees_url":"https://api.github.com/repos/iclab/centinel/assignees{/user}","branches_url":"https://api.github.com/repos/iclab/centinel/branches{/branch}","tags_url":"https://api.github.com/repos/iclab/centinel/tags","blobs_url":"https://api.github.com/repos/iclab/centinel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iclab/centinel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iclab/centinel/git/refs{/sha}","trees_url":"https://api.github.com/repos/iclab/centinel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iclab/centinel/statuses/{sha}","languages_url":"https://api.github.com/repos/iclab/centinel/languages","stargazers_url":"https://api.github.com/repos/iclab/centinel/stargazers","contributors_url":"https://api.github.com/repos/iclab/centinel/contributors","subscribers_url":"https://api.github.com/repos/iclab/centinel/subscribers","subscription_url":"https://api.github.com/repos/iclab/centinel/subscription","commits_url":"https://api.github.com/repos/iclab/centinel/commits{/sha}","git_commits_url":"https://api.github.com/repos/iclab/centinel/git/commits{/sha}","comments_url":"https://api.github.com/repos/iclab/centinel/comments{/number}","issue_comment_url":"https://api.github.com/repos/iclab/centinel/issues/comments{/number}","contents_url":"https://api.github.com/repos/iclab/centinel/contents/{+path}","compare_url":"https://api.github.com/repos/iclab/centinel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iclab/centinel/merges","archive_url":"https://api.github.com/repos/iclab/centinel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iclab/centinel/downloads","issues_url":"https://api.github.com/repos/iclab/centinel/issues{/number}","pulls_url":"https://api.github.com/repos/iclab/centinel/pulls{/number}","milestones_url":"https://api.github.com/repos/iclab/centinel/milestones{/number}","notifications_url":"https://api.github.com/repos/iclab/centinel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iclab/centinel/labels{/name}","releases_url":"https://api.github.com/repos/iclab/centinel/releases{/id}","created_at":"2014-05-06T02:52:27Z","updated_at":"2015-06-21T13:50:20Z","pushed_at":"2015-06-30T23:23:24Z","git_url":"git://github.com/iclab/centinel.git","ssh_url":"git@github.com:iclab/centinel.git","clone_url":"https://github.com/iclab/centinel.git","svn_url":"https://github.com/iclab/centinel","homepage":"http://iclab.org/","size":2054,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":20,"forks":11,"open_issues":20,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iclab/centinel/pulls/144"},"html":{"href":"https://github.com/iclab/centinel/pull/144"},"issue":{"href":"https://api.github.com/repos/iclab/centinel/issues/144"},"comments":{"href":"https://api.github.com/repos/iclab/centinel/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/iclab/centinel/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/iclab/centinel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iclab/centinel/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/iclab/centinel/statuses/c84bdbc02f26142164b95db352e1a4e155088e2f"}}}}