diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-03-02 21:54:30 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-03-02 21:54:30 +1300 |
commit | 602e400cccd10b7a790c7d353d508fe36f560f60 (patch) | |
tree | 5fc59414de4df254bbae7171d9a9d4092923908b /libpathod/pathoc.py | |
parent | 53334e437c6c9e7df0a6e979dbe255ab27d8e2c9 (diff) | |
download | mitmproxy-602e400cccd10b7a790c7d353d508fe36f560f60.tar.gz mitmproxy-602e400cccd10b7a790c7d353d508fe36f560f60.tar.bz2 mitmproxy-602e400cccd10b7a790c7d353d508fe36f560f60.zip |
Use new get_current_cipher to show cipher in pathoc SSL output
Diffstat (limited to 'libpathod/pathoc.py')
-rw-r--r-- | libpathod/pathoc.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index 995a56d8..7354c380 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -8,8 +8,8 @@ class PathocError(Exception): pass class SSLInfo: - def __init__(self, certchain): - self.certchain = certchain + def __init__(self, certchain, cipher): + self.certchain, self.cipher = certchain, cipher class Response: @@ -68,7 +68,8 @@ class Pathoc(tcp.TCPClient): except tcp.NetLibError, v: raise PathocError(str(v)) self.sslinfo = SSLInfo( - self.connection.get_peer_cert_chain() + self.connection.get_peer_cert_chain(), + self.get_current_cipher() ) def request(self, spec): @@ -160,6 +161,7 @@ class Pathoc(tcp.TCPClient): self._show_summary(fp, *resp) if self.sslinfo: + print >> fp, "Cipher: %s, %s bit, %s"%self.sslinfo.cipher print >> fp, "SSL certificate chain:\n" for i in self.sslinfo.certchain: print >> fp, "\tSubject: ", |