Test cert generation errors.

This commit is contained in:
Aldo Cortesi
2013-03-02 16:59:16 +13:00
parent 09c73019c5
commit 415844511c
4 changed files with 22 additions and 9 deletions

View File

@@ -306,7 +306,7 @@ class ProxyHandler(tcp.BaseHandler):
host = conn.cert.cn.decode("utf8").encode("idna")
ret = self.config.certstore.get_cert(host, sans, self.config.cacert)
if not ret:
raise ProxyError(502, "mitmproxy: Unable to generate dummy cert.")
raise ProxyError(502, "Unable to generate dummy cert.")
return ret
def get_line(self, fp):