)]}'
{"barbican/plugin/crypto/p11_crypto.py":[{"author":{"_account_id":16429,"name":"Nick Smith","email":"nick.a.smith@thales-esecurity.com","username":"nickrmc83"},"change_message_id":"a3e1dbb6ab133b5e765df08af6541555bf0472de","unresolved":false,"context_lines":[{"line_number":36,"context_line":"               help\u003du._(\u0027Master KEK length in bytes.\u0027)),"},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027hmac_label\u0027,"},{"line_number":38,"context_line":"               help\u003du._(\u0027HMAC label (used in the HSM)\u0027)),"},{"line_number":39,"context_line":"    cfg.IntOpt(\u0027slot_id\u0027,"},{"line_number":40,"context_line":"               help\u003du._(\u0027HSM Slot ID\u0027),"},{"line_number":41,"context_line":"               default\u003d1),"},{"line_number":42,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_707b208d","line":39,"updated":"2015-05-19 09:04:15.000000000","message":"Instead of using a fixed slot it is better, from a generic P11 standpoint, to enumerate each slot looking for a specific token. This was obviously not introduced in this change but worth noting.","commit_id":"4241f53aa5d1bdb44418e484db711a76019c71b8"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"d92baa2b98a82091ca85356ef9dba7ed47ef6368","unresolved":false,"context_lines":[{"line_number":36,"context_line":"               help\u003du._(\u0027Master KEK length in bytes.\u0027)),"},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027hmac_label\u0027,"},{"line_number":38,"context_line":"               help\u003du._(\u0027HMAC label (used in the HSM)\u0027)),"},{"line_number":39,"context_line":"    cfg.IntOpt(\u0027slot_id\u0027,"},{"line_number":40,"context_line":"               help\u003du._(\u0027HSM Slot ID\u0027),"},{"line_number":41,"context_line":"               default\u003d1),"},{"line_number":42,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_0c4bb02b","line":39,"in_reply_to":"7a016987_707b208d","updated":"2015-05-19 14:39:45.000000000","message":"Yeah, it would probably be good to investigate this in the future.","commit_id":"4241f53aa5d1bdb44418e484db711a76019c71b8"},{"author":{"_account_id":16429,"name":"Nick Smith","email":"nick.a.smith@thales-esecurity.com","username":"nickrmc83"},"change_message_id":"a3e1dbb6ab133b5e765df08af6541555bf0472de","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        )"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def encrypt(self, encrypt_dto, kek_meta_dto, project_id):"},{"line_number":71,"context_line":"        session \u003d self.pkcs11.create_working_session()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        key \u003d self.pkcs11.unwrap_key(kek_meta_dto.plugin_meta, session)"},{"line_number":74,"context_line":"        iv \u003d self.pkcs11.generate_random(16, session)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_250fa889","line":71,"updated":"2015-05-19 09:04:15.000000000","message":"In several places within this file a new session is created and subsequently destroyed. However between the create and destroy there are a number of opportunities for exceptions to be raised bypassing the session tear down. As such, I think wrapping the session in a context manager and using that would be a good thing.","commit_id":"4241f53aa5d1bdb44418e484db711a76019c71b8"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"d92baa2b98a82091ca85356ef9dba7ed47ef6368","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        )"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def encrypt(self, encrypt_dto, kek_meta_dto, project_id):"},{"line_number":71,"context_line":"        session \u003d self.pkcs11.create_working_session()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        key \u003d self.pkcs11.unwrap_key(kek_meta_dto.plugin_meta, session)"},{"line_number":74,"context_line":"        iv \u003d self.pkcs11.generate_random(16, session)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_6c24645f","line":71,"in_reply_to":"7a016987_250fa889","updated":"2015-05-19 14:39:45.000000000","message":"I agree that we should be using context managers; however, as this CR is just splitting out a bunch of code into a different module, unfortunately, I think that\u0027s out of scope for this change. With that said, I think it would be a great future patch.","commit_id":"4241f53aa5d1bdb44418e484db711a76019c71b8"}]}
