Lines Matching +full:write +full:- +full:host
5 # args are HOST:PORT [, HOST:PORT...]
11 def fetch_server_certificate (host, port): argument
23 m = re.search(r"^([-]+BEGIN CERTIFICATE[-]+[\r]*\n"
24 r".*[\r]*^[-]+END CERTIFICATE[-]+)$",
31 fp.write(m.group(1) + "\n")
35 status, output = subproc(r'openssl x509 -in "%s" -out "%s"' %
50 fp.write("quit\n")
54 'openssl s_client -connect "%s:%s" -showcerts < "%s"' %
55 (host, port, tfile))
60 'openssl s_client -connect "%s:%s" -showcerts < /dev/null' %
61 (host, port))
67 (host, port))
72 sys.stderr.write(
77 host, port = arg.split(":") variable
78 sys.stdout.write(fetch_server_certificate(host, int(port)))