)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"22a4179b26f2de345fed2df54675668527691291","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Thomas Leaman \u003cthomas.leaman@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-06-18 16:11:12 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow preverify_ok to be checked correctly"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027preverify_ok is True\u0027 will always return false"},{"line_number":10,"context_line":"changed to \u0027preverify_ok \u003d\u003d True\u0027"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAPn%2F%2F56I%3D","line":7,"updated":"2013-06-18 16:17:00.000000000","message":"Could we say something more along the lines of \"Fix SSL certificate CNAME checking\" here? I think that would give a better idea of the functionality change.","commit_id":"18554037d4d33befbe7cb34eb1896adc7fed30fa"}],"glanceclient/common/http.py":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"87b09c3c73a30caad9360ce2df229fad9b341a8b","unresolved":false,"context_lines":[{"line_number":337,"context_line":"            msg \u003d \"SSL Certificate expired on \u0027%s\u0027\" % x509.get_notAfter()"},{"line_number":338,"context_line":"            raise exc.SSLCertificateError(msg)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        # preverify_ok will be 1 if successful, \u003e1 otherwise"},{"line_number":341,"context_line":"        if depth \u003d\u003d 0 and preverify_ok \u003d\u003d 1:"},{"line_number":342,"context_line":"            # We verify that the host matches against the last"},{"line_number":343,"context_line":"            # certificate in the chain"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2F3vQ%3D","line":340,"updated":"2013-06-19 12:07:15.000000000","message":"Tom,\n\ncan we double check the \u0027\u003e1 otherwise\u0027? It looks to me like a \u00270\u0027 can be returned in case of a failure? Thanks!","commit_id":"1bb7e98df3d4026405306237770379ed3d5ba3cc"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"ede745dd9c37e15d33fb3743351d9bf84948af02","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            return self.host_matches_cert(self.host, x509)"},{"line_number":345,"context_line":"        else:"},{"line_number":346,"context_line":"            # Pass through OpenSSL\u0027s default result"},{"line_number":347,"context_line":"            return preverify_ok"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def setcontext(self):"},{"line_number":350,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2F0jY%3D","line":347,"updated":"2013-06-20 13:04:02.000000000","message":"From the OpenSSL doc it appears that verify_callback should return a boolean, and preverify_ok in an integer.\n\nMaybe \"return preverify_ok \u003d\u003d 1\" ?","commit_id":"1be3301885633f21dd58cb2f7a62f1ba76f34520"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"e7cb52286d2caac9cfed924a28b6dc712ccc1b93","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            raise exc.SSLCertificateError(msg)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        # preverify_ok will be 1 if successful"},{"line_number":341,"context_line":"        if depth \u003d\u003d 0 and preverify_ok \u003d\u003d 1:"},{"line_number":342,"context_line":"            # We verify that the host matches against the last"},{"line_number":343,"context_line":"            # certificate in the chain"},{"line_number":344,"context_line":"            return self.host_matches_cert(self.host, x509)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPn%2F%2FzuE%3D","line":341,"updated":"2013-06-20 18:58:41.000000000","message":"Not that I actually like python\u0027s bool promiscuity, but should we even bother with direct comparison here? Why not\n\n  if depth \u003d\u003d 0 and preverify_ok:\n\n\nand later on during the return\n\n  return bool(preverify_ok)\n\nor just \n\n  return preverify_ok\n\nThough I guess I like making the cast in the return explicit.","commit_id":"8fbff324e4c3de3a77b13cf7e0125614334a7c42"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"1be1e78e0268b37d69ea69166eb25270cdfc424f","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            raise exc.SSLCertificateError(msg)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        # preverify_ok will be 1 if successful"},{"line_number":341,"context_line":"        if depth \u003d\u003d 0 and preverify_ok \u003d\u003d 1:"},{"line_number":342,"context_line":"            # We verify that the host matches against the last"},{"line_number":343,"context_line":"            # certificate in the chain"},{"line_number":344,"context_line":"            return self.host_matches_cert(self.host, x509)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPn%2F%2Ftyo%3D","line":341,"in_reply_to":"AAAAPn%2F%2Fykg%3D","updated":"2013-06-24 16:25:42.000000000","message":"I think the code is probably ok as is -- but perhaps explicitly mentioning how strictly we must adhere to typing would be helpful/prevent over enthusiastic changing? Just a thought.","commit_id":"8fbff324e4c3de3a77b13cf7e0125614334a7c42"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"f09eb5949dec26b7dacd23abf09ac432f919d66f","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            raise exc.SSLCertificateError(msg)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        # preverify_ok will be 1 if successful"},{"line_number":341,"context_line":"        if depth \u003d\u003d 0 and preverify_ok \u003d\u003d 1:"},{"line_number":342,"context_line":"            # We verify that the host matches against the last"},{"line_number":343,"context_line":"            # certificate in the chain"},{"line_number":344,"context_line":"            return self.host_matches_cert(self.host, x509)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAPn%2F%2Fykg%3D","line":341,"in_reply_to":"AAAAPn%2F%2FzuE%3D","updated":"2013-06-21 07:31:57.000000000","message":"According to OpenSSL module doc, preverify_ok is a int, not a boolean.","commit_id":"8fbff324e4c3de3a77b13cf7e0125614334a7c42"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"d864f62448226027b93e47e839b41d98cd5e9974","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            raise exc.SSLCertificateError(msg)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        # preverify_ok will be 1 if successful"},{"line_number":341,"context_line":"        # NOTE(leaman): preverify_ok must be compared to another int,"},{"line_number":342,"context_line":"        # implicitly casting it to a bool will always evaluate to False"},{"line_number":343,"context_line":"        if depth \u003d\u003d 0 and preverify_ok \u003d\u003d 1:"},{"line_number":344,"context_line":"            # We verify that the host matches against the last"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAP3%2F%2FtNI%3D","line":341,"updated":"2013-07-12 17:45:15.000000000","message":"This comment is a bit confusing. And since this was an area with a sensitive bug, I would like to see it improved.\n\nFirst off, preverify_ok doesn\u0027t need to be compared to another int in order to be evaluated. Several alternatives would work (just not \u0027is True\u0027). Secondly, saying \u0027preverify_ok is True\u0027 is not an implicit cast. An implicit cast to python truthiness would actually work fine here. As would an explicit cast. Finally, nobody reading the code by itself will know that we used to be using \u0027is True\u0027, so the comment will just seem like a non sequitur.\n\nFor context, here\u0027s a brief demo\n\n  $ python\n  Python 2.7.3 (default, Nov  1 2012, 13:53:22)\n  [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin\n  Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n  \u003e\u003e\u003e 1 is True\n  False\n  \u003e\u003e\u003e 1 \u003d\u003d True\n  True\n  \u003e\u003e\u003e bool(1)\n  True\n  \u003e\u003e\u003e if 1:\n  ...     print \"Lookin\u0027 good!\"\n  ...\n  Lookin\u0027 good!\n  \u003e\u003e\u003e\n\n\nIts a bit of a wart that the pyOpenSSL code is passing through C-style int booleans to python, so I\u0027d strongly encourage a change here that would work even if they \"fixed\" that behavior. E.g.\n\n  def verify_callback(self, connection, x509, errnum, depth, preverify_ok):\n      # NOTE(leaman): preverify_ok may be a non-boolean type\n      preverify_ok \u003d bool(preverify_ok)\n  \n      ...\n\n      if depth \u003d\u003d 0 and preverify_ok:\n          ...","commit_id":"511a6d293bcf55055f56cc9d79f6f14348d583f9"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"d864f62448226027b93e47e839b41d98cd5e9974","unresolved":false,"context_lines":[{"line_number":346,"context_line":"            return self.host_matches_cert(self.host, x509)"},{"line_number":347,"context_line":"        else:"},{"line_number":348,"context_line":"            # Pass through OpenSSL\u0027s default result"},{"line_number":349,"context_line":"            return preverify_ok \u003d\u003d 1"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"    def setcontext(self):"},{"line_number":352,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAP3%2F%2FtM8%3D","line":349,"updated":"2013-07-12 17:45:15.000000000","message":"If following the suggestion noted above, this line need not change.","commit_id":"511a6d293bcf55055f56cc9d79f6f14348d583f9"}]}
