mitmproxy/test/tools/getcn
Aldo Cortesi 00942c1431 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.
2012-02-27 15:05:45 +13:00

14 lines
202 B
Python
Executable File

#!/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