SSL certificate of a server on Windows
COPIN Mathieu.
flmat.urt at gmail.com
Wed May 24 10:11:34 EDT 2017
Le mardi 23 mai 2017 19:10:11 UTC+2, Irmen de Jong a écrit :
> 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
That's what I neeeded, thank you !
More information about the Python-list
mailing list