Secure ssl connection with wrap_socket

Andrea Di Mario anddimario at gmail.com
Tue Jul 5 10:52:57 CEST 2011


Hi, I'm a new python user and I'm writing a small web service with ssl.
I want use a self-signed certificate like in wiki:
http://docs.python.org/dev/library/ssl.html#certificates
I've used wrap_socket, but if i try to use
cert_reqs=ssl.CERT_REQUIRED, it doesn't work with error:

urllib2.URLError: <urlopen error _ssl.c:326: No root certificates
specified for verification of other-side certificates.>

It works only with CERT_NONE (the default) but with this option i
could access to the service in insicure mode.

Have you some suggestions for my service?

Thanks. Regards.

-- 
Andrea Di Mario



More information about the Python-list mailing list