{"action":"created","issue":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/490","labels_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/490/labels{/name}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/490/comments","events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/490/events","html_url":"https://github.com/mitmproxy/mitmproxy/issues/490","id":59198554,"number":490,"title":"Mitmproxy crashed with 'unknown certificate type'","user":{"login":"bayandin","id":864213,"avatar_url":"https://avatars.githubusercontent.com/u/864213?v=3","gravatar_id":"","url":"https://api.github.com/users/bayandin","html_url":"https://github.com/bayandin","followers_url":"https://api.github.com/users/bayandin/followers","following_url":"https://api.github.com/users/bayandin/following{/other_user}","gists_url":"https://api.github.com/users/bayandin/gists{/gist_id}","starred_url":"https://api.github.com/users/bayandin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bayandin/subscriptions","organizations_url":"https://api.github.com/users/bayandin/orgs","repos_url":"https://api.github.com/users/bayandin/repos","events_url":"https://api.github.com/users/bayandin/events{/privacy}","received_events_url":"https://api.github.com/users/bayandin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-27T07:03:01Z","updated_at":"2015-02-27T12:12:32Z","closed_at":null,"body":"Sometimes mitmproxy is crashing with error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/libmproxy/proxy/server.py\", line 99, in handle\r\n    protocol_handler(self.conntype)(self, **conn_kwargs).handle_messages()\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/libmproxy/protocol/http.py\", line 982, in handle_messages\r\n    while self.handle_flow():\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/libmproxy/protocol/http.py\", line 1055, in handle_flow\r\n    ret = self.process_request(flow, req)\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/libmproxy/protocol/http.py\", line 1248, in process_request\r\n    return self.process_connect_request(self.c.server_conn.address)\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/libmproxy/protocol/http.py\", line 1395, in process_connect_request\r\n    self.c.establish_ssl(server=True, client=True)\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/libmproxy/proxy/server.py\", line 215, in establish_ssl\r\n    chain_file=chain_file\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/libmproxy/proxy/connection.py\", line 66, in convert_to_ssl\r\n    tcp.BaseHandler.convert_to_ssl(self, *args, **kwargs)\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/netlib/tcp.py\", line 428, in convert_to_ssl\r\n    ctx = self._create_ssl_context(cert, key, **sslctx_kwargs)\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/netlib/tcp.py\", line 412, in _create_ssl_context\r\n    ctx.use_certificate(cert.x509)\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/OpenSSL/SSL.py\", line 406, in use_certificate\r\n    _raise_current_error()\r\n  File \"/Users/bayandin/tools/mitmproxy/lib/python2.7/site-packages/OpenSSL/_util.py\", line 22, in exception_from_error_queue\r\n    raise exceptionType(errors)\r\nError: [('SSL routines', 'SSL_SET_CERT', 'unknown certificate type')]\r\n\r\nSegmentation fault: 11\r\n```\r\n\r\nI use Python 2.7.9, OS X 10.10 and use mitm proxy for capturing traffic from Android 5.0.1"},"comment":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/comments/76385725","html_url":"https://github.com/mitmproxy/mitmproxy/issues/490#issuecomment-76385725","issue_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/490","id":76385725,"user":{"login":"mhils","id":1019198,"avatar_url":"https://avatars.githubusercontent.com/u/1019198?v=3","gravatar_id":"","url":"https://api.github.com/users/mhils","html_url":"https://github.com/mhils","followers_url":"https://api.github.com/users/mhils/followers","following_url":"https://api.github.com/users/mhils/following{/other_user}","gists_url":"https://api.github.com/users/mhils/gists{/gist_id}","starred_url":"https://api.github.com/users/mhils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhils/subscriptions","organizations_url":"https://api.github.com/users/mhils/orgs","repos_url":"https://api.github.com/users/mhils/repos","events_url":"https://api.github.com/users/mhils/events{/privacy}","received_events_url":"https://api.github.com/users/mhils/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T12:12:32Z","updated_at":"2015-02-27T12:12:32Z","body":"Thanks. This might be a pyOpenSSL issue - how can I reproduce it?"}}