)]}'
{"barbican/plugin/crypto/pkcs11.py":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"4b8c7ca9e2a2fd56248e7ab68443b3fe6d340578","unresolved":false,"context_lines":[{"line_number":408,"context_line":"                attributes[index].value_len \u003d 8"},{"line_number":409,"context_line":"            elif isinstance(attr.value, str):"},{"line_number":410,"context_line":"                val_list.append(self.ffi.new(\"char []\", attr.value"},{"line_number":411,"context_line":"                                .encode(\u0027utf-8\u0027)))"},{"line_number":412,"context_line":"                attributes[index].value_len \u003d len(attr.value)"},{"line_number":413,"context_line":"            else:"},{"line_number":414,"context_line":"                raise TypeError(u._(\"Unknown attribute type provided.\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_e4d451be","line":411,"updated":"2015-09-28 08:59:39.000000000","message":"Hum, the indentation is a little bit strange.","commit_id":"317af8d23758dd8cee26d0c8df2ff551c51bd8fe"},{"author":{"_account_id":8004,"name":"Paul Kehrer","email":"paul.l.kehrer@gmail.com","username":"reaperhulk"},"change_message_id":"5f30ce6273b7744c9ed3b5aa4907a01db54dbb0b","unresolved":false,"context_lines":[{"line_number":408,"context_line":"                attributes[index].value_len \u003d 8"},{"line_number":409,"context_line":"            elif isinstance(attr.value, str):"},{"line_number":410,"context_line":"                val_list.append(self.ffi.new("},{"line_number":411,"context_line":"                                \"char []\", attr.value.encode(\u0027utf-8\u0027)))"},{"line_number":412,"context_line":"                attributes[index].value_len \u003d len(attr.value)"},{"line_number":413,"context_line":"            else:"},{"line_number":414,"context_line":"                raise TypeError(u._(\"Unknown attribute type provided.\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_76c7f045","line":411,"updated":"2015-10-05 14:13:04.000000000","message":"Doing this here actually doesn\u0027t properly handle unicode in Python 2. This call itself is fine, but line 490 wraps a str() around the value it passes so unicode will blow up there. It might be a separate CR to fix that, but right now only ascii is safe.","commit_id":"56e83e3ee76d1336792bb253be9912af291dda16"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"1bf1e309e01291599cfd7f8d1c8f84b3714e4984","unresolved":false,"context_lines":[{"line_number":408,"context_line":"                attributes[index].value_len \u003d 8"},{"line_number":409,"context_line":"            elif isinstance(attr.value, str):"},{"line_number":410,"context_line":"                val_list.append(self.ffi.new("},{"line_number":411,"context_line":"                                \"char []\", attr.value.encode(\u0027utf-8\u0027)))"},{"line_number":412,"context_line":"                attributes[index].value_len \u003d len(attr.value)"},{"line_number":413,"context_line":"            else:"},{"line_number":414,"context_line":"                raise TypeError(u._(\"Unknown attribute type provided.\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_ff64334a","line":411,"in_reply_to":"7a2fa921_76c7f045","updated":"2015-10-05 15:06:01.000000000","message":"I only tried to fix tests on Python 3 without breaking tests on Python 2. I\u0027m quite sure that it\u0027s not enough to handle non-ASCII characters :-)\n\nThis change is not to support the full Unicode Character Set, but just to fix a TypeError on Python 3.","commit_id":"56e83e3ee76d1336792bb253be9912af291dda16"},{"author":{"_account_id":8004,"name":"Paul Kehrer","email":"paul.l.kehrer@gmail.com","username":"reaperhulk"},"change_message_id":"5f30ce6273b7744c9ed3b5aa4907a01db54dbb0b","unresolved":false,"context_lines":[{"line_number":702,"context_line":""},{"line_number":703,"context_line":"    def pad(self, unencrypted):"},{"line_number":704,"context_line":"        padder \u003d padding.PKCS7(self.block_size * 8).padder()"},{"line_number":705,"context_line":"        return padder.update(unencrypted.encode(\u0027utf-8\u0027)) + padder.finalize()"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"    def unpad(self, unencrypted):"},{"line_number":708,"context_line":"        unpadder \u003d padding.PKCS7(self.block_size * 8).unpadder()"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_96b5ec7f","line":705,"updated":"2015-10-05 14:13:04.000000000","message":"Why do the encoding here? Since this is only ever called with the value of encrypt_dto.unencrypted it seems like a better idea to normalize the inbound data to a byte string ASAP and then just raise an error here if you get anything but a byte string.","commit_id":"56e83e3ee76d1336792bb253be9912af291dda16"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"1bf1e309e01291599cfd7f8d1c8f84b3714e4984","unresolved":false,"context_lines":[{"line_number":702,"context_line":""},{"line_number":703,"context_line":"    def pad(self, unencrypted):"},{"line_number":704,"context_line":"        padder \u003d padding.PKCS7(self.block_size * 8).padder()"},{"line_number":705,"context_line":"        return padder.update(unencrypted.encode(\u0027utf-8\u0027)) + padder.finalize()"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"    def unpad(self, unencrypted):"},{"line_number":708,"context_line":"        unpadder \u003d padding.PKCS7(self.block_size * 8).unpadder()"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_bf39db43","line":705,"in_reply_to":"7a2fa921_96b5ec7f","updated":"2015-10-05 15:06:01.000000000","message":"I blindly tried to port Barbican to Python 3, but it looks like you understand the code better than me. Would you like to rework my patch to fix the Unicode vs bytes issue in the caller?","commit_id":"56e83e3ee76d1336792bb253be9912af291dda16"}],"barbican/tests/plugin/crypto/test_p11_crypto.py":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"4b8c7ca9e2a2fd56248e7ab68443b3fe6d340578","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.cfg_mock.p11_crypto_plugin.mkek_length \u003d 32"},{"line_number":54,"context_line":"        self.cfg_mock.p11_crypto_plugin.slot_id \u003d 1"},{"line_number":55,"context_line":"        with mock.patch.object(pkcs11.PKCS11, \u0027get_key_handle\u0027) as mocked:"},{"line_number":56,"context_line":"            mocked.return_value \u003d int(1)"},{"line_number":57,"context_line":"            self.plugin \u003d p11_crypto.P11CryptoPlugin("},{"line_number":58,"context_line":"                ffi\u003dself.ffi, conf\u003dself.cfg_mock"},{"line_number":59,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_44e65db5","line":56,"updated":"2015-09-28 08:59:39.000000000","message":"int(1) is useless: just write 1.","commit_id":"317af8d23758dd8cee26d0c8df2ff551c51bd8fe"}]}
