{"action":"created","issue":{"url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/521","repository_url":"https://api.github.com/repos/JoinMarket-Org/joinmarket","labels_url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/521/labels{/name}","comments_url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/521/comments","events_url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/521/events","html_url":"https://github.com/JoinMarket-Org/joinmarket/pull/521","id":153668784,"number":521,"title":"Catch exceptions in encryption initialization","user":{"login":"AdamISZ","id":4278257,"avatar_url":"https://avatars.githubusercontent.com/u/4278257?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamISZ","html_url":"https://github.com/AdamISZ","followers_url":"https://api.github.com/users/AdamISZ/followers","following_url":"https://api.github.com/users/AdamISZ/following{/other_user}","gists_url":"https://api.github.com/users/AdamISZ/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamISZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamISZ/subscriptions","organizations_url":"https://api.github.com/users/AdamISZ/orgs","repos_url":"https://api.github.com/users/AdamISZ/repos","events_url":"https://api.github.com/users/AdamISZ/events{/privacy}","received_events_url":"https://api.github.com/users/AdamISZ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-08T17:57:37Z","updated_at":"2016-05-08T19:45:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/pulls/521","html_url":"https://github.com/JoinMarket-Org/joinmarket/pull/521","diff_url":"https://github.com/JoinMarket-Org/joinmarket/pull/521.diff","patch_url":"https://github.com/JoinMarket-Org/joinmarket/pull/521.patch"},"body":"Inexplicably I did not do any sanity checking on whether the pubkey/key objects passed into the wrapper functions in enc_wrapper when I set it up.\r\n\r\nIn this PR there is a placeholder `NaclError` exception type and the pubkeys and keypair objects are checked to be of the right format.\r\n\r\nThe specific relevance is the `fill` and `pubkey` messages pass a pubkey in hex, now it is checked to be of the right format and if not, the message is ignored. See the edits to the `CoinJoinTx` and `CoinJoinOrder` objects in taker and maker.\r\n\r\nThere are some tests added also in test_enc_wrapper and in test_irc_messaging (bad `fill`), although not for the exception catch in `CoinJoinTx.start_encryption`. That test is a little tricky to write. Will see if coverage complains or not. And since the crucial point here is to catch on the maker side, I thought it better to PR as is.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/comments/217741922","html_url":"https://github.com/JoinMarket-Org/joinmarket/pull/521#issuecomment-217741922","issue_url":"https://api.github.com/repos/JoinMarket-Org/joinmarket/issues/521","id":217741922,"user":{"login":"AdamISZ","id":4278257,"avatar_url":"https://avatars.githubusercontent.com/u/4278257?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamISZ","html_url":"https://github.com/AdamISZ","followers_url":"https://api.github.com/users/AdamISZ/followers","following_url":"https://api.github.com/users/AdamISZ/following{/other_user}","gists_url":"https://api.github.com/users/AdamISZ/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamISZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamISZ/subscriptions","organizations_url":"https://api.github.com/users/AdamISZ/orgs","repos_url":"https://api.github.com/users/AdamISZ/repos","events_url":"https://api.github.com/users/AdamISZ/events{/privacy}","received_events_url":"https://api.github.com/users/AdamISZ/received_events","type":"User","site_admin":false},"created_at":"2016-05-08T19:45:15Z","updated_at":"2016-05-08T19:45:15Z","body":"send_error lines added, thanks."}}