aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-02-27 15:05:45 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-02-27 15:05:45 +1300
commit00942c1431c551e0bded111271be9b69f5261d91 (patch)
treec03a1bd9c18ae941446bbdb24dcfa01b3890287a /test/tools
parent4a2964985c3ca9e044134857175bde895372a898 (diff)
downloadmitmproxy-00942c1431c551e0bded111271be9b69f5261d91.tar.gz
mitmproxy-00942c1431c551e0bded111271be9b69f5261d91.tar.bz2
mitmproxy-00942c1431c551e0bded111271be9b69f5261d91.zip
Add upstream certificate lookup.
This initiates a connection to the server to obtain certificate information to generate interception certificates. At the moment, the information used is the Common Name, and the list of Subject Alternative Names.
Diffstat (limited to 'test/tools')
-rwxr-xr-xtest/tools/getcn13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/tools/getcn b/test/tools/getcn
new file mode 100755
index 00000000..d17ec0f6
--- /dev/null
+++ b/test/tools/getcn
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+import sys
+sys.path.insert(0, "../..")
+from libmproxy import utils
+
+cn, san = utils.get_remote_cn(sys.argv[1], 443)
+print cn
+if san:
+ for i in san:
+ print "\t", i
+
+