Re: urllib getting SSL certificate info

2008-08-20 Thread Heikki Toivonen
Ghirai wrote: > Would you mind sharing some code? The module is pretty ugly and on top has no > docs whatsoever; got tired of reading the source... Did you find out the right homepage at http://chandlerproject.org/Projects/MeTooCrypto? The original author, ngps, hasn't been involved in the projec

Re: urllib getting SSL certificate info

2008-08-19 Thread Ghirai
On Wednesday 20 August 2008 00:05:47 Jean-Paul Calderone wrote: > I don't know about M2Crypto. Here's some sample code for PyOpenSSL: > > from socket import socket > from OpenSSL.SSL import Connection, Context, SSLv3_METHOD > s = socket() > s.connect(('google.com', 443)) > c = Connectio

Re: urllib getting SSL certificate info

2008-08-19 Thread Jean-Paul Calderone
On Tue, 19 Aug 2008 23:06:30 +0300, Ghirai <[EMAIL PROTECTED]> wrote: On Sunday 17 August 2008 20:15:47 John Nagle wrote: If you really need details from the SSL cert, you usually have to use M2Crypto. The base SSL package doesn't actually do much with certificates. It doesn't validate the

Re: urllib getting SSL certificate info

2008-08-19 Thread Ghirai
On Sunday 17 August 2008 20:15:47 John Nagle wrote: > If you really need details from the SSL cert, you usually have to use > M2Crypto. The base SSL package doesn't actually do much with certificates. > It doesn't validate the certificate chain. And those strings of > attributes you can get

Re: urllib getting SSL certificate info

2008-08-17 Thread John Nagle
Fredrik Lundh wrote: Ghirai wrote: Using urllib, is there any way i could access some info about the SSL certificate (when opening a https url)? I'm really interested in the fingerprint. I haven't been able to find anything so far. you can get some info via (undocumented?) attributes on th

Re: urllib getting SSL certificate info

2008-08-16 Thread Ghirai
On Saturday 16 August 2008 12:16:14 Fredrik Lundh wrote: > Ghirai wrote: > > Using urllib, is there any way i could access some info about the SSL > > certificate (when opening a https url)? > > > > I'm really interested in the fingerprint. > > > > I haven't been able to find anything so far. > > y

Re: urllib getting SSL certificate info

2008-08-16 Thread Fredrik Lundh
Ghirai wrote: Using urllib, is there any way i could access some info about the SSL certificate (when opening a https url)? I'm really interested in the fingerprint. I haven't been able to find anything so far. you can get some info via (undocumented?) attributes on the file handle: >>> im

urllib getting SSL certificate info

2008-08-16 Thread Ghirai
Hello list, Using urllib, is there any way i could access some info about the SSL certificate (when opening a https url)? I'm really interested in the fingerprint. I haven't been able to find anything so far. Any help is appreciated. -- Regards, Ghirai. -- http://mail.python.org/mailman/list