aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/certutils.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-04-03 11:10:25 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-04-03 11:10:25 +1200
commit61fab03b24bdb53d203eb7fb68ba891874d11114 (patch)
tree17c45c32905802d9da9ac6bb81c3239a8b5c264d /libmproxy/certutils.py
parentf526e5fa125339e8f3a16c1590c1607f45862b47 (diff)
downloadmitmproxy-61fab03b24bdb53d203eb7fb68ba891874d11114.tar.gz
mitmproxy-61fab03b24bdb53d203eb7fb68ba891874d11114.tar.bz2
mitmproxy-61fab03b24bdb53d203eb7fb68ba891874d11114.zip
Add a details page, available from a flow view with the 'X' shortcut
At the moment, this shows the upstream SSL certificate details. More fine-grained detail that doesn't fit in the flow view itself will be added.
Diffstat (limited to 'libmproxy/certutils.py')
-rw-r--r--libmproxy/certutils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/libmproxy/certutils.py b/libmproxy/certutils.py
index 5fbc9840..f393648d 100644
--- a/libmproxy/certutils.py
+++ b/libmproxy/certutils.py
@@ -152,6 +152,10 @@ class SSLCert:
return self.cert.digest(name)
@property
+ def issuer(self):
+ return self.cert.get_issuer().get_components()
+
+ @property
def notbefore(self):
return self.cert.get_notBefore()
@@ -186,7 +190,7 @@ class SSLCert:
@property
def cn(self):
cn = None
- for i in self.cert.get_subject().get_components():
+ for i in self.subject:
if i[0] == "CN":
cn = i[1]
return cn
@@ -199,7 +203,7 @@ class SSLCert:
if ext.get_short_name() == "subjectAltName":
dec = decode(ext.get_data(), asn1Spec=_GeneralNames())
for i in dec[0]:
- altnames.append(i[0])
+ altnames.append(i[0].asOctets())
return altnames