2012-02-27 02:05:45 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import sys
|
2012-03-01 08:08:44 +00:00
|
|
|
sys.path.insert(0, "../../")
|
|
|
|
from libmproxy import certutils
|
|
|
|
|
|
|
|
if len(sys.argv) > 2:
|
|
|
|
port = int(sys.argv[2])
|
|
|
|
else:
|
|
|
|
pport = 443
|
2012-02-27 02:05:45 +00:00
|
|
|
|
2012-03-01 08:08:44 +00:00
|
|
|
cn, san = certutils.get_remote_cn(sys.argv[1], port)
|
2012-02-27 02:05:45 +00:00
|
|
|
print cn
|
|
|
|
if san:
|
|
|
|
for i in san:
|
|
|
|
print "\t", i
|
|
|
|
|
2012-02-27 02:21:05 +00:00
|
|
|
|