Lines Matching +full:write +full:- +full:host
5 # args are HOST:PORT [, HOST:PORT...]
15 def fetch_server_certificate (host, port): argument
25 m = re.search(br"^([-]+BEGIN CERTIFICATE[-]+[\r]*\n"
26 br".*[\r]*^[-]+END CERTIFICATE[-]+)$",
33 fp.write(m.group(1) + b"\n")
37 status, output = subproc(r'openssl x509 -in "%s" -out "%s"' %
53 fp.write("quit\n")
57 'openssl s_client -connect "%s:%s" -showcerts < "%s"' %
58 (host, port, tfile))
63 'openssl s_client -connect "%s:%s" -showcerts < /dev/null' %
64 (host, port))
71 (host, port))
77 sys.stderr.write(
82 host, port = arg.split(":") variable
83 sys.stdout.buffer.write(fetch_server_certificate(host, int(port)))