)]}'
{"barbican/common/validators.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"446911f57b38613dd1277cd37bbb512591deb98c","unresolved":false,"context_lines":[{"line_number":442,"context_line":"            pubkey \u003d csr.get_pubkey()"},{"line_number":443,"context_line":"            csr.get_subject()"},{"line_number":444,"context_line":"            csr.verify(pubkey)"},{"line_number":445,"context_line":"        except Exception:"},{"line_number":446,"context_line":"            raise exception.InvalidPKCS10Data()"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def _validate_full_cmc_data(self, request_data):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_361a337d","line":445,"updated":"2015-03-16 16:08:22.000000000","message":"it would perhaps be a better idea to narrow things down to the few exceptions that could happen here? Also would be good to dig down what exactly what happened, would help more for debugging.","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"7406d9cacc1d03c5fbd647be65b4c42ac2763593","unresolved":false,"context_lines":[{"line_number":442,"context_line":"            pubkey \u003d csr.get_pubkey()"},{"line_number":443,"context_line":"            csr.get_subject()"},{"line_number":444,"context_line":"            csr.verify(pubkey)"},{"line_number":445,"context_line":"        except Exception:"},{"line_number":446,"context_line":"            raise exception.InvalidPKCS10Data()"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def _validate_full_cmc_data(self, request_data):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_55078781","line":445,"in_reply_to":"9a80dd14_361a337d","updated":"2015-03-16 22:13:45.000000000","message":"Done","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7d131c3ca0b51198dc35873b0770f1184084a28","unresolved":false,"context_lines":[{"line_number":442,"context_line":"            pubkey \u003d csr.get_pubkey()"},{"line_number":443,"context_line":"            csr.get_subject()"},{"line_number":444,"context_line":"            csr.verify(pubkey)"},{"line_number":445,"context_line":"        except Exception:"},{"line_number":446,"context_line":"            raise exception.InvalidPKCS10Data()"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def _validate_full_cmc_data(self, request_data):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_eabee7ad","line":445,"in_reply_to":"9a80dd14_361a337d","updated":"2015-03-16 17:22:54.000000000","message":"I\u0027m building on Juan\u0027s thoughts. I think it would be useful to have this in two sections. The first section load the CSR and creates csr. If that fails then invalid loading of the data. The second section would be to verify the signature with the public key. I think a good error message for logging or back to user would be that the signing key is incorrect.\n\nWhy do you call csr.get_subject()? Does that provide another test on the CSR?","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"7406d9cacc1d03c5fbd647be65b4c42ac2763593","unresolved":false,"context_lines":[{"line_number":442,"context_line":"            pubkey \u003d csr.get_pubkey()"},{"line_number":443,"context_line":"            csr.get_subject()"},{"line_number":444,"context_line":"            csr.verify(pubkey)"},{"line_number":445,"context_line":"        except Exception:"},{"line_number":446,"context_line":"            raise exception.InvalidPKCS10Data()"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"    def _validate_full_cmc_data(self, request_data):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_9501ff6c","line":445,"in_reply_to":"9a80dd14_eabee7ad","updated":"2015-03-16 22:13:45.000000000","message":"Done","commit_id":"5497742d29720991133db10af72d62dc17c373f6"}],"barbican/tests/certificate_utils.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"446911f57b38613dd1277cd37bbb512591deb98c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9a80dd14_5636c703","updated":"2015-03-16 16:08:22.000000000","message":"nit: For consistency with the rest of the code, we are not using camel-case for naming the functions... or at least it shouldn\u0027t be the case.\n\nOn the other hand, for people not so familiar with pyOpenSSL, it would be better if you could put more comments or dissect your functions a little bit, also, rename some variables so they actually reflect what the objects are, and not the weird names that pyOpenSSL decided to use.\n\nAlso, some more documentation of the functions would help.","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"7406d9cacc1d03c5fbd647be65b4c42ac2763593","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9a80dd14_d520d7fa","in_reply_to":"9a80dd14_0a025b72","updated":"2015-03-16 22:13:45.000000000","message":"Done","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"7406d9cacc1d03c5fbd647be65b4c42ac2763593","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9a80dd14_950f3f88","in_reply_to":"9a80dd14_5636c703","updated":"2015-03-16 22:13:45.000000000","message":"Done","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7d131c3ca0b51198dc35873b0770f1184084a28","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9a80dd14_0a025b72","in_reply_to":"9a80dd14_5636c703","updated":"2015-03-16 17:22:54.000000000","message":"I agree on the camel case.","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"446911f57b38613dd1277cd37bbb512591deb98c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"def createKeyPair(type, bits):"},{"line_number":20,"context_line":"    keypair \u003d crypto.PKey()"},{"line_number":21,"context_line":"    keypair.generate_key(type, bits)"},{"line_number":22,"context_line":"    return keypair"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def createGoodPKCS10():"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_aadeb46a","line":22,"updated":"2015-03-16 16:08:22.000000000","message":"uhm... is this really a keypair?","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"7406d9cacc1d03c5fbd647be65b4c42ac2763593","unresolved":false,"context_lines":[{"line_number":19,"context_line":"def createKeyPair(type, bits):"},{"line_number":20,"context_line":"    keypair \u003d crypto.PKey()"},{"line_number":21,"context_line":"    keypair.generate_key(type, bits)"},{"line_number":22,"context_line":"    return keypair"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def createGoodPKCS10():"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_b56a8319","line":22,"in_reply_to":"9a80dd14_aadeb46a","updated":"2015-03-16 22:13:45.000000000","message":"yes. :-)","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"446911f57b38613dd1277cd37bbb512591deb98c","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def createGoodPKCS10():"},{"line_number":26,"context_line":"    pkey \u003d createKeyPair(crypto.TYPE_RSA, 1024)"},{"line_number":27,"context_line":"    req \u003d crypto.X509Req()"},{"line_number":28,"context_line":"    subject \u003d req.get_subject()"},{"line_number":29,"context_line":"    setattr(subject, \"CN\", \"example.net\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_0f98b273","line":26,"updated":"2015-03-16 16:08:22.000000000","message":"for instance, here \u0027pkey\u0027 could be changed to \u0027keypair\u0027 as the function name reflects, or whatever the entity actually is.","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"7406d9cacc1d03c5fbd647be65b4c42ac2763593","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def createGoodPKCS10():"},{"line_number":26,"context_line":"    pkey \u003d createKeyPair(crypto.TYPE_RSA, 1024)"},{"line_number":27,"context_line":"    req \u003d crypto.X509Req()"},{"line_number":28,"context_line":"    subject \u003d req.get_subject()"},{"line_number":29,"context_line":"    setattr(subject, \"CN\", \"example.net\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_f5ef9baf","line":26,"in_reply_to":"9a80dd14_0f98b273","updated":"2015-03-16 22:13:45.000000000","message":"Done","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"446911f57b38613dd1277cd37bbb512591deb98c","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def createGoodPKCS10():"},{"line_number":26,"context_line":"    pkey \u003d createKeyPair(crypto.TYPE_RSA, 1024)"},{"line_number":27,"context_line":"    req \u003d crypto.X509Req()"},{"line_number":28,"context_line":"    subject \u003d req.get_subject()"},{"line_number":29,"context_line":"    setattr(subject, \"CN\", \"example.net\")"},{"line_number":30,"context_line":"    req.set_pubkey(pkey)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_af7de61d","line":27,"updated":"2015-03-16 16:08:22.000000000","message":"req -\u003e cert_request?","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"7406d9cacc1d03c5fbd647be65b4c42ac2763593","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def createGoodPKCS10():"},{"line_number":26,"context_line":"    pkey \u003d createKeyPair(crypto.TYPE_RSA, 1024)"},{"line_number":27,"context_line":"    req \u003d crypto.X509Req()"},{"line_number":28,"context_line":"    subject \u003d req.get_subject()"},{"line_number":29,"context_line":"    setattr(subject, \"CN\", \"example.net\")"},{"line_number":30,"context_line":"    req.set_pubkey(pkey)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_15ed0fb8","line":27,"in_reply_to":"9a80dd14_af7de61d","updated":"2015-03-16 22:13:45.000000000","message":"Done","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"446911f57b38613dd1277cd37bbb512591deb98c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    setattr(subject, \"CN\", \"example.net\")"},{"line_number":51,"context_line":"    req.set_pubkey(pkey)"},{"line_number":52,"context_line":"    pkey2 \u003d createKeyPair(crypto.TYPE_RSA, 1024)"},{"line_number":53,"context_line":"    req.sign(pkey2, \"md5\")"},{"line_number":54,"context_line":"    pem \u003d crypto.dump_certificate_request(crypto.FILETYPE_PEM, req)"},{"line_number":55,"context_line":"    return pem"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_6fae8e82","line":53,"updated":"2015-03-16 16:08:22.000000000","message":"Here some comments would help make it more apparent that this is actually being signed by another key. Then again, a better name for pkey2 would help too.","commit_id":"5497742d29720991133db10af72d62dc17c373f6"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"7406d9cacc1d03c5fbd647be65b4c42ac2763593","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    setattr(subject, \"CN\", \"example.net\")"},{"line_number":51,"context_line":"    req.set_pubkey(pkey)"},{"line_number":52,"context_line":"    pkey2 \u003d createKeyPair(crypto.TYPE_RSA, 1024)"},{"line_number":53,"context_line":"    req.sign(pkey2, \"md5\")"},{"line_number":54,"context_line":"    pem \u003d crypto.dump_certificate_request(crypto.FILETYPE_PEM, req)"},{"line_number":55,"context_line":"    return pem"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_95381f3f","line":53,"in_reply_to":"9a80dd14_6fae8e82","updated":"2015-03-16 22:13:45.000000000","message":"Done","commit_id":"5497742d29720991133db10af72d62dc17c373f6"}]}
