)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"365a32228f13ad0bc17cc52857305074daf79788","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"remove universal_newlines"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Need to make sure that binary and text are both handled corectly for cms calls."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: If3ed5f339b53942d4ed6d6b2d9fc4eebd7180b0a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAWH%2F%2BFpw%3D","line":9,"updated":"2014-03-30 16:01:21.000000000","message":"change \"corectly\" to \"correctly\"","commit_id":"e7149d1019e7601390f1d1e655db8a19041d5974"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"d264b86dba8493b878804c0e970a9d8756ed3441","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"remove universal_newlines"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Need to make sure that binary and text are both handled correctly for cms calls."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: If3ed5f339b53942d4ed6d6b2d9fc4eebd7180b0a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAXH%2F%2Fb4s%3D","line":9,"updated":"2014-04-21 20:26:18.000000000","message":"Do we have a BP this is associated with. We really should be better about tracking code etc.","commit_id":"11aee4152ef13f3222ca1171627414af080b33b2"}],"keystoneclient/common/cms.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"604cae5fd35ce1265e1c94a0f930082baea93410","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    :raises: CertificateConfigError if certificate is not configured properly."},{"line_number":105,"context_line":"    \"\"\""},{"line_number":106,"context_line":"    _ensure_subprocess()"},{"line_number":107,"context_line":"    data \u003d data \u003d bytearray(formatted, encoding\u003d\u0027utf-8\u0027)"},{"line_number":108,"context_line":"    process \u003d subprocess.Popen([\"openssl\", \"cms\", \"-verify\","},{"line_number":109,"context_line":"                                \"-certfile\", signing_cert_file_name,"},{"line_number":110,"context_line":"                                \"-CAfile\", ca_file_name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2B6Go%3D","line":107,"updated":"2014-03-21 19:25:41.000000000","message":"Argh..ok this was dumb.  Will clean up","commit_id":"01d8ac36ef8cef9d2126d9b8a2cf5277d46d1042"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"365a32228f13ad0bc17cc52857305074daf79788","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    return err"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def _process_communicate_handle_oserror(process, text, files):"},{"line_number":76,"context_line":"    \"\"\"Wrapper around process.communicate that checks for OSError.\"\"\""},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BFpg%3D","line":74,"updated":"2014-03-30 16:01:21.000000000","message":"suggest change \"text\" to \"data\", since that\u0027s what it\u0027s called with now.","commit_id":"e7149d1019e7601390f1d1e655db8a19041d5974"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"365a32228f13ad0bc17cc52857305074daf79788","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    \"\"\"Wrapper around process.communicate that checks for OSError.\"\"\""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    try:"},{"line_number":79,"context_line":"        output, err \u003d process.communicate(text)"},{"line_number":80,"context_line":"    except OSError as e:"},{"line_number":81,"context_line":"        if e.errno !\u003d errno.EPIPE:"},{"line_number":82,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BFos%3D","line":79,"updated":"2014-03-30 16:01:21.000000000","message":"Don\u0027t output and err need to be decoded in the case where there\u0027s no exception? I think it\u0027s going to be confusing to callers if err is sometimes decoded and sometimes not.","commit_id":"e7149d1019e7601390f1d1e655db8a19041d5974"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"365a32228f13ad0bc17cc52857305074daf79788","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        err \u003d _check_files_accessible(files)"},{"line_number":89,"context_line":"        if process.stderr:"},{"line_number":90,"context_line":"            msg \u003d process.stderr.read()"},{"line_number":91,"context_line":"            err \u003d err + msg.decode(\"utf-8\")"},{"line_number":92,"context_line":"        output \u003d \"\""},{"line_number":93,"context_line":"        retcode \u003d -1"},{"line_number":94,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BFpc%3D","line":91,"updated":"2014-03-30 16:01:21.000000000","message":"prefer \u0027 for strings.","commit_id":"e7149d1019e7601390f1d1e655db8a19041d5974"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"365a32228f13ad0bc17cc52857305074daf79788","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                               stdin\u003dsubprocess.PIPE,"},{"line_number":115,"context_line":"                               stdout\u003dsubprocess.PIPE,"},{"line_number":116,"context_line":"                               stderr\u003dsubprocess.PIPE,"},{"line_number":117,"context_line":"                               universal_newlines\u003dFalse)"},{"line_number":118,"context_line":"    output, err, retcode \u003d _process_communicate_handle_oserror("},{"line_number":119,"context_line":"        process, data, (signing_cert_file_name, ca_file_name))"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BFps%3D","line":117,"updated":"2014-03-30 16:01:21.000000000","message":"remove \"universal_newlines\u003dFalse\", that\u0027s the default.","commit_id":"e7149d1019e7601390f1d1e655db8a19041d5974"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"365a32228f13ad0bc17cc52857305074daf79788","unresolved":false,"context_lines":[{"line_number":239,"context_line":"    output, err, retcode \u003d _process_communicate_handle_oserror("},{"line_number":240,"context_line":"        process, data, (signing_cert_file_name, signing_key_file_name))"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    if retcode or \"Error\" in err.decode(\"utf-8\"):"},{"line_number":243,"context_line":"        LOG.error(\u0027Signing error: %s\u0027 % err)"},{"line_number":244,"context_line":"        raise subprocess.CalledProcessError(retcode, \"openssl\")"},{"line_number":245,"context_line":"    return output.decode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BFpU%3D","line":242,"updated":"2014-03-30 16:01:21.000000000","message":"use \u0027 for strings consistently","commit_id":"e7149d1019e7601390f1d1e655db8a19041d5974"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"34750fe778bba709174bc4c7c5b360983f9421b5","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    else:"},{"line_number":95,"context_line":"        retcode \u003d process.poll()"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    return output, err, retcode"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def cms_verify(formatted, signing_cert_file_name, ca_file_name):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2Fb2E%3D","line":97,"updated":"2014-04-21 20:21:40.000000000","message":"I think it\u0027s going to be confusing that err is returned decoded and output is not decoded. It looks like the callers eventually always decode output (cms_sign_text does it itself while cms_verify leaves it to the caller).\n\nI think it would be easier if output were decoded here rather than having the caller do it.","commit_id":"11aee4152ef13f3222ca1171627414af080b33b2"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"d264b86dba8493b878804c0e970a9d8756ed3441","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    else:"},{"line_number":95,"context_line":"        retcode \u003d process.poll()"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    return output, err, retcode"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def cms_verify(formatted, signing_cert_file_name, ca_file_name):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2Fb0g%3D","line":97,"in_reply_to":"AAAAXH%2F%2Fb2E%3D","updated":"2014-04-21 20:26:18.000000000","message":"This would also be more consistent with the previous behavior, before it was all text to begin with, we should avoid needing to call .decode(\u0027utf-8\u0027) every time for the sake of calling it.","commit_id":"11aee4152ef13f3222ca1171627414af080b33b2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"34750fe778bba709174bc4c7c5b360983f9421b5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    \"\"\""},{"line_number":106,"context_line":"    _ensure_subprocess()"},{"line_number":107,"context_line":"    data \u003d bytearray(formatted, encoding\u003d\u0027utf-8\u0027)"},{"line_number":108,"context_line":"    process \u003d subprocess.Popen([\u0027openssl\u0027, \u0027cms\u0027, \u0027-verify\u0027,"},{"line_number":109,"context_line":"                                \u0027-certfile\u0027, signing_cert_file_name,"},{"line_number":110,"context_line":"                                \u0027-CAfile\u0027, ca_file_name,"},{"line_number":111,"context_line":"                                \u0027-inform\u0027, \u0027PEM\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2Fb20%3D","line":108,"updated":"2014-04-21 20:21:40.000000000","message":"this would be easier to review if the unrelated change to change \" to \u0027 were done in a separate commit.","commit_id":"11aee4152ef13f3222ca1171627414af080b33b2"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"d264b86dba8493b878804c0e970a9d8756ed3441","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    \"\"\""},{"line_number":106,"context_line":"    _ensure_subprocess()"},{"line_number":107,"context_line":"    data \u003d bytearray(formatted, encoding\u003d\u0027utf-8\u0027)"},{"line_number":108,"context_line":"    process \u003d subprocess.Popen([\u0027openssl\u0027, \u0027cms\u0027, \u0027-verify\u0027,"},{"line_number":109,"context_line":"                                \u0027-certfile\u0027, signing_cert_file_name,"},{"line_number":110,"context_line":"                                \u0027-CAfile\u0027, ca_file_name,"},{"line_number":111,"context_line":"                                \u0027-inform\u0027, \u0027PEM\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAXH%2F%2Fb1E%3D","line":108,"in_reply_to":"AAAAXH%2F%2Fb20%3D","updated":"2014-04-21 20:26:18.000000000","message":"++","commit_id":"11aee4152ef13f3222ca1171627414af080b33b2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3e3cae7aa0e6085ad51c572d5b9a7237dab0b4d2","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        retcode \u003d -1"},{"line_number":94,"context_line":"    else:"},{"line_number":95,"context_line":"        retcode \u003d process.poll()"},{"line_number":96,"context_line":"        if (err):"},{"line_number":97,"context_line":"            err \u003d err.decode(\u0027utf-8\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    return output, err, retcode"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAXH%2F%2Fa8c%3D","line":96,"updated":"2014-04-22 01:21:36.000000000","message":"remove (), this is python\n\nalso, this should be \"if err is not None:\", since this function should return a string rather than an empty bytes.","commit_id":"866bf18387ca0d702249379ced5d2bac5f2c5f52"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3e3cae7aa0e6085ad51c572d5b9a7237dab0b4d2","unresolved":false,"context_lines":[{"line_number":246,"context_line":"    output, err, retcode \u003d _process_communicate_handle_oserror("},{"line_number":247,"context_line":"        process, data, (signing_cert_file_name, signing_key_file_name))"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    if retcode or err and \u0027Error\u0027 in err:"},{"line_number":250,"context_line":"        LOG.error(\u0027Signing error: %s\u0027 % err)"},{"line_number":251,"context_line":"        raise subprocess.CalledProcessError(retcode, \u0027openssl\u0027)"},{"line_number":252,"context_line":"    return output.decode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAXH%2F%2FaTc%3D","line":249,"updated":"2014-04-22 01:21:36.000000000","message":"why do we have to check \"if err\" now when we didn\u0027t before?\n\nAlso, add () to make the complex boolean expression easily parsable.\n\n if retcode or (err and (\u0027Error\u0027 in err)):","commit_id":"866bf18387ca0d702249379ced5d2bac5f2c5f52"}],"keystoneclient/middleware/auth_token.py":[{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"c4463d79eefc0db849268dc739dec753694d118e","unresolved":false,"context_lines":[{"line_number":1246,"context_line":"            except cms.subprocess.CalledProcessError as err:"},{"line_number":1247,"context_line":"                self.LOG.warning(\u0027Verify error: %s\u0027, err)"},{"line_number":1248,"context_line":"                raise"},{"line_number":1249,"context_line":"            return output.decode(\u0027utf-8\u0027)"},{"line_number":1250,"context_line":""},{"line_number":1251,"context_line":"    def verify_signed_token(self, signed_text):"},{"line_number":1252,"context_line":"        \"\"\"Check that the token is unrevoked and has a valid signature.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2BtnY%3D","line":1249,"updated":"2014-03-24 21:58:39.000000000","message":"needing this means you must have changed the signature of the cms_verify function. Why don\u0027t you just do the .decode() there?","commit_id":"e7149d1019e7601390f1d1e655db8a19041d5974"}]}
