)]}'
{"barbican/plugin/crypto/p11_crypto.py":[{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"4d0b0de977b4bd7c0489b513b03c1620aa87dc69","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        # are raised that can be fixed by reinitializing the pkcs11 library"},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            return func(*args, **kwargs)"},{"line_number":134,"context_line":"        except (pkcs11.P11CryptoTokenException) as pe:"},{"line_number":135,"context_line":"            LOG.warn(\"Reinitializing pkcs11 library due to {e}\".format(e\u003dpe))"},{"line_number":136,"context_line":"            self._reinitialize_pkcs11()"},{"line_number":137,"context_line":"            return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_92cc1b36","line":134,"range":{"start_line":134,"start_character":16,"end_line":134,"end_character":46},"updated":"2016-05-23 19:13:31.000000000","message":"Instead of retrying for only a P11CryptoTokenExceptions can we retry for any generic pkcs11 exception?\n\nLike have these:\nP11CryptoPluginKeyException, P11CryptoPluginException, P11CryptoKeyHandleException, P11CryptoTokenException\n\ninherit \"exception.PKCS11Exception\" and we throw error when any exception of PKCS-11 type is caught.","commit_id":"2ac8be81001d0c9d92061b954791d26d9ce6b3c5"},{"author":{"_account_id":14926,"name":"Jeff Feng","email":"jianhua@us.ibm.com","username":"jhfeng"},"change_message_id":"1d8595bec5577aefb1b52dcb1f154f598928140a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            self.mk_cache.clear()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        self.pkcs11 \u003d self._create_pkcs11(self.conf.p11_crypto_plugin)"},{"line_number":284,"context_line":"        self._configure_object_cache()"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def _get_session(self):"},{"line_number":287,"context_line":"        return self.pkcs11.get_session()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_0bc84021","line":284,"updated":"2016-05-26 19:16:17.000000000","message":"missing local variable setting ( as in Line91 -97)","commit_id":"88aac6e6f1dc0cff717af3706a5f3067b150f59f"},{"author":{"_account_id":780,"name":"John McKenzie","email":"jmckind@gmail.com","username":"jmckind"},"change_message_id":"af6a51847de7eb87ac5edde4938ede9a2ed41324","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            self.mk_cache.clear()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        self.pkcs11 \u003d self._create_pkcs11(self.conf.p11_crypto_plugin)"},{"line_number":284,"context_line":"        self._configure_object_cache()"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def _get_session(self):"},{"line_number":287,"context_line":"        return self.pkcs11.get_session()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_a44fa132","line":284,"in_reply_to":"bab6814e_0bc84021","updated":"2016-05-26 19:27:40.000000000","message":"@Jeff, those variables only need to be set once when the P11CryptoPlugin class is initialized. We are reinitializing the PKCS11 object and cache here, not the P11CryptoPlugin class.","commit_id":"88aac6e6f1dc0cff717af3706a5f3067b150f59f"},{"author":{"_account_id":14926,"name":"Jeff Feng","email":"jianhua@us.ibm.com","username":"jhfeng"},"change_message_id":"8ecaa394b8c016a0f838c0564eb45dc7ee1b4ba7","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            self.mk_cache.clear()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        self.pkcs11 \u003d self._create_pkcs11(self.conf.p11_crypto_plugin)"},{"line_number":284,"context_line":"        self._configure_object_cache()"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def _get_session(self):"},{"line_number":287,"context_line":"        return self.pkcs11.get_session()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_84cb7d52","line":284,"in_reply_to":"bab6814e_a44fa132","updated":"2016-05-26 19:32:28.000000000","message":"oh yes. my misreading. Thanks John","commit_id":"88aac6e6f1dc0cff717af3706a5f3067b150f59f"}],"barbican/plugin/crypto/pkcs11.py":[{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"4d0b0de977b4bd7c0489b513b03c1620aa87dc69","unresolved":false,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"class P11CryptoTokenException(exception.BarbicanException):"},{"line_number":337,"context_line":"    message \u003d u._(\"No token was found in slot\")"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"class PKCS11(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_d0cdfcb8","line":337,"updated":"2016-05-23 19:13:31.000000000","message":"It would be useful to pass the actual slot id to the message. We can move the exceptions to common.","commit_id":"2ac8be81001d0c9d92061b954791d26d9ce6b3c5"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"4d0b0de977b4bd7c0489b513b03c1620aa87dc69","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        self._check_error(rv)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"    def _check_error(self, value):"},{"line_number":579,"context_line":"        if value \u003d\u003d CKR_OK:"},{"line_number":580,"context_line":"            return"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"        code \u003d ERROR_CODES.get(value, \u0027CKR_????\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_d05b3cf5","line":579,"updated":"2016-05-23 19:13:31.000000000","message":"I don\u0027t think this is needed. In the base patch we only throw the error when we need to else it returns. This is extra code. I would just leave it as !\u003d and remove the return","commit_id":"2ac8be81001d0c9d92061b954791d26d9ce6b3c5"},{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"4d0b0de977b4bd7c0489b513b03c1620aa87dc69","unresolved":false,"context_lines":[{"line_number":583,"context_line":"        hex_code \u003d \"{hex} {code}\".format(hex\u003dhex(value), code\u003dcode)"},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"        if code \u003d\u003d \u0027CKR_TOKEN_NOT_PRESENT\u0027:"},{"line_number":586,"context_line":"            raise P11CryptoTokenException"},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"        # TODO(jkf) Expand error handling to raise different exceptions"},{"line_number":589,"context_line":"        # for notable errors we want to handle programmatically"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_f0248061","line":586,"updated":"2016-05-23 19:13:31.000000000","message":"Could we add the slot id here when we are raising the Exception.","commit_id":"2ac8be81001d0c9d92061b954791d26d9ce6b3c5"}]}
