)]}'
{"nova/signature_utils.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a2970ea044acf8d9443c4ea6590a2f370f56230b","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                                                      hash_method,"},{"line_number":218,"context_line":"                                                      public_key)"},{"line_number":219,"context_line":"    except crypto_exception.UnsupportedAlgorithm as e:"},{"line_number":220,"context_line":"        msg \u003d (_LE(\"Unable to create verifier since algorithm is \""},{"line_number":221,"context_line":"                   \"unsupported: %(e)s\")"},{"line_number":222,"context_line":"               % {\u0027e\u0027: encodeutils.exception_to_unicode(e)})"},{"line_number":223,"context_line":"        LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_2815e2e3","line":220,"range":{"start_line":220,"start_character":8,"end_line":220,"end_character":11},"updated":"2016-01-25 06:04:29.000000000","message":"The variable \u0027msg\u0027 is used only once.\nSo \u0027msg\u0027 need not be used.\nThe following would be better:\n\n        LOG.error(_LE(\"Unable to create verifier since algorithm is \"\n                      \"unsupported: %(e)s\"),\n                  {\u0027e\u0027: encodeutils.exception_to_unicode(e)})","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"10e8babb5a80ec8dbaa7f06f758db447e9d587a7","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                                                      hash_method,"},{"line_number":218,"context_line":"                                                      public_key)"},{"line_number":219,"context_line":"    except crypto_exception.UnsupportedAlgorithm as e:"},{"line_number":220,"context_line":"        msg \u003d (_LE(\"Unable to create verifier since algorithm is \""},{"line_number":221,"context_line":"                   \"unsupported: %(e)s\")"},{"line_number":222,"context_line":"               % {\u0027e\u0027: encodeutils.exception_to_unicode(e)})"},{"line_number":223,"context_line":"        LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_f0b78882","line":220,"range":{"start_line":220,"start_character":8,"end_line":220,"end_character":11},"in_reply_to":"9a68dd71_2815e2e3","updated":"2016-01-25 21:42:31.000000000","message":"Done","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a2970ea044acf8d9443c4ea6590a2f370f56230b","unresolved":false,"context_lines":[{"line_number":222,"context_line":"               % {\u0027e\u0027: encodeutils.exception_to_unicode(e)})"},{"line_number":223,"context_line":"        LOG.error(msg)"},{"line_number":224,"context_line":"        raise exception.SignatureVerificationError("},{"line_number":225,"context_line":"            \u0027Unable to verify signature since the algorithm is unsupported \u0027"},{"line_number":226,"context_line":"            \u0027on this system\u0027)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    if verifier:"},{"line_number":229,"context_line":"        return verifier"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_e8c02a52","line":226,"range":{"start_line":225,"start_character":12,"end_line":226,"end_character":28},"updated":"2016-01-25 06:04:29.000000000","message":"Is \u0027reason\u003d_()\u0027 unnecessary?\nSee line 233.","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"10e8babb5a80ec8dbaa7f06f758db447e9d587a7","unresolved":false,"context_lines":[{"line_number":222,"context_line":"               % {\u0027e\u0027: encodeutils.exception_to_unicode(e)})"},{"line_number":223,"context_line":"        LOG.error(msg)"},{"line_number":224,"context_line":"        raise exception.SignatureVerificationError("},{"line_number":225,"context_line":"            \u0027Unable to verify signature since the algorithm is unsupported \u0027"},{"line_number":226,"context_line":"            \u0027on this system\u0027)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    if verifier:"},{"line_number":229,"context_line":"        return verifier"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_50fbf446","line":226,"range":{"start_line":225,"start_character":12,"end_line":226,"end_character":28},"in_reply_to":"9a68dd71_e8c02a52","updated":"2016-01-25 21:42:31.000000000","message":"I looked at where SignatureVerificationError is defined (https://github.com/openstack/nova/blob/master/nova/exception.py#L1703) and I think reason should be included.  Added in upcoming patch.","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"2b6c29543afcb23a634772a62cba4f8efb410296","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    except crypto_exception.UnsupportedAlgorithm as e:"},{"line_number":220,"context_line":"        LOG.error(_LE(\"Unable to create verifier since the %(alg)s algorithm \""},{"line_number":221,"context_line":"                      \"is unsupported: %(e)s\")"},{"line_number":222,"context_line":"                  % {\u0027alg\u0027: img_signature_hash_method,"},{"line_number":223,"context_line":"                     \u0027e\u0027: encodeutils.exception_to_unicode(e)})"},{"line_number":224,"context_line":"        raise exception.SignatureVerificationError("},{"line_number":225,"context_line":"            reason\u003d_(\u0027Unable to verify signature since the %s algorithm is \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_87f12604","line":222,"updated":"2016-01-26 05:43:18.000000000","message":"Use \u0027,\u0027 instead of \u0027%\u0027.\nSee an example in my comment in PS2.","commit_id":"436a2a7051da6aa28c37e87838336ffdb71cd91a"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"f0160528223bd538e899748b8bcb4a9c271fcaf6","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    except crypto_exception.UnsupportedAlgorithm as e:"},{"line_number":220,"context_line":"        LOG.error(_LE(\"Unable to create verifier since the %(alg)s algorithm \""},{"line_number":221,"context_line":"                      \"is unsupported: %(e)s\")"},{"line_number":222,"context_line":"                  % {\u0027alg\u0027: img_signature_hash_method,"},{"line_number":223,"context_line":"                     \u0027e\u0027: encodeutils.exception_to_unicode(e)})"},{"line_number":224,"context_line":"        raise exception.SignatureVerificationError("},{"line_number":225,"context_line":"            reason\u003d_(\u0027Unable to verify signature since the %s algorithm is \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_e291d953","line":222,"in_reply_to":"9a68dd71_87f12604","updated":"2016-01-26 14:39:11.000000000","message":"Done","commit_id":"436a2a7051da6aa28c37e87838336ffdb71cd91a"}],"nova/tests/unit/test_signature_utils.py":[{"author":{"_account_id":11428,"name":"Ajaya Agrawal","email":"ajku.agr@gmail.com","username":"ajayaa"},"change_message_id":"5fe9ff3dad8d2d82ba87f61f33260bf0c84079b7","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    \"\"\"Test methods of signature_utils\"\"\""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @unittest.skipIf(not default_backend().hash_supported(hashes.SHA256()),"},{"line_number":111,"context_line":"                     \"SHA-2 hash algorithms not supported by backend\")"},{"line_number":112,"context_line":"    @mock.patch(\u0027nova.signature_utils.get_public_key\u0027)"},{"line_number":113,"context_line":"    def test_verify_signature_PSS(self, mock_get_pub_key):"},{"line_number":114,"context_line":"        data \u003d b\u0027224626ae19824466f2a7f39ab7b80f7f\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_7149955f","line":111,"range":{"start_line":111,"start_character":0,"end_line":111,"end_character":21},"updated":"2016-01-24 08:09:28.000000000","message":"At some places (for e.g. test_wsgi.py) in nova tests testtools.skipIf is being used and here unittest.skipIf is being used. Not a big issue, But I would love to see only one method being used everywhere.","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"ac725a350f152735f69d85add8b45dadbe8d5d98","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    \"\"\"Test methods of signature_utils\"\"\""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @unittest.skipIf(not default_backend().hash_supported(hashes.SHA256()),"},{"line_number":111,"context_line":"                     \"SHA-2 hash algorithms not supported by backend\")"},{"line_number":112,"context_line":"    @mock.patch(\u0027nova.signature_utils.get_public_key\u0027)"},{"line_number":113,"context_line":"    def test_verify_signature_PSS(self, mock_get_pub_key):"},{"line_number":114,"context_line":"        data \u003d b\u0027224626ae19824466f2a7f39ab7b80f7f\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_d00ead31","line":111,"updated":"2016-01-18 14:37:58.000000000","message":"Is there a way to skip only the SHA-256 hash if it\u0027s not supported? Or are we assuming that all the hashes in the signature_utils class are unsupported if SHA-256 is? I\u0027d prefer to skip only the cases that we strictly need to skip.","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"10e8babb5a80ec8dbaa7f06f758db447e9d587a7","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    \"\"\"Test methods of signature_utils\"\"\""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @unittest.skipIf(not default_backend().hash_supported(hashes.SHA256()),"},{"line_number":111,"context_line":"                     \"SHA-2 hash algorithms not supported by backend\")"},{"line_number":112,"context_line":"    @mock.patch(\u0027nova.signature_utils.get_public_key\u0027)"},{"line_number":113,"context_line":"    def test_verify_signature_PSS(self, mock_get_pub_key):"},{"line_number":114,"context_line":"        data \u003d b\u0027224626ae19824466f2a7f39ab7b80f7f\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_30d9a057","line":111,"range":{"start_line":111,"start_character":0,"end_line":111,"end_character":21},"in_reply_to":"9a68dd71_7149955f","updated":"2016-01-25 21:42:31.000000000","message":"I\u0027m all for consistency.  Done.","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"8672a148cd3e3559acee292bbc0be17c1ad8b87a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    \"\"\"Test methods of signature_utils\"\"\""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @unittest.skipIf(not default_backend().hash_supported(hashes.SHA256()),"},{"line_number":111,"context_line":"                     \"SHA-2 hash algorithms not supported by backend\")"},{"line_number":112,"context_line":"    @mock.patch(\u0027nova.signature_utils.get_public_key\u0027)"},{"line_number":113,"context_line":"    def test_verify_signature_PSS(self, mock_get_pub_key):"},{"line_number":114,"context_line":"        data \u003d b\u0027224626ae19824466f2a7f39ab7b80f7f\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_29856006","line":111,"in_reply_to":"da6ed579_d00ead31","updated":"2016-01-18 15:21:31.000000000","message":"Currently, there are only four hashes supported: SHA-224, SHA-256, SHA-384, and SHA-512.  All four are part of the SHA-2 family of algorithms.  I think that all systems that support one of them support all of them, and likewise if SHA-256 is not supported, it is very unlikely that any others will be.\n\nI don\u0027t think it would be worthwhile to make several near-identical unit tests for each of the four hash algorithms, since the \"skipIf\" is meant to skip the unit test on systems that do not support any SHA-2 hash algorithms.","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"ac725a350f152735f69d85add8b45dadbe8d5d98","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            verifier.verify()"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    @unittest.skipIf(not default_backend().hash_supported(hashes.SHA256()),"},{"line_number":182,"context_line":"                     \"SHA-2 hash algorithms not supported by backend\")"},{"line_number":183,"context_line":"    @mock.patch(\u0027nova.signature_utils.get_public_key\u0027)"},{"line_number":184,"context_line":"    def test_verify_signature_bad_signature(self, mock_get_pub_key):"},{"line_number":185,"context_line":"        data \u003d b\u0027224626ae19824466f2a7f39ab7b80f7f\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_706261da","line":182,"updated":"2016-01-18 14:37:58.000000000","message":"Similar to my previous question, can we simply rewrite this test with another SHA variant and avoid having to skip it?","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"8672a148cd3e3559acee292bbc0be17c1ad8b87a","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            verifier.verify()"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    @unittest.skipIf(not default_backend().hash_supported(hashes.SHA256()),"},{"line_number":182,"context_line":"                     \"SHA-2 hash algorithms not supported by backend\")"},{"line_number":183,"context_line":"    @mock.patch(\u0027nova.signature_utils.get_public_key\u0027)"},{"line_number":184,"context_line":"    def test_verify_signature_bad_signature(self, mock_get_pub_key):"},{"line_number":185,"context_line":"        data \u003d b\u0027224626ae19824466f2a7f39ab7b80f7f\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_8976cc3c","line":182,"in_reply_to":"da6ed579_706261da","updated":"2016-01-18 15:21:31.000000000","message":"See above comment.","commit_id":"cf3844be1f1dd3244cab984f5eb873ddafd41169"}]}
