On 23-5-2017 10:19, COPIN Mathieu. wrote: > Hi, > > I want to get a server certificate from the host-name. > > I know I could do something like : >> call(openssl, s_client, -showcerts, -connect, hostname:port) > > > But the thing is to do it without openssl because I want to run the script on > Windows. > > Any suggestions ? > Mathieu >
I guess you mean: without calling "openssl.exe" import ssl cert = sll.get_server_certificate(("www.google.com", 443)) See https://docs.python.org/3.6/library/ssl.html#ssl.get_server_certificate Irmen -- https://mail.python.org/mailman/listinfo/python-list