Python and SSL enabled

Heikki Toivonen heikki at osafoundation.org
Wed Oct 25 21:12:51 CEST 2006


matey wrote:
> I am have version 2.3.4.  I want to write a python script to access a
> secure HTTPS.
> 
> I tried the following:
> 
> import urllib
> urllib.urlopen("https://somesecuresite.com")
> s = f.read()
> f.close()

I hope you know the Python stdlib SSL does not provide certificate
checking etc. security features you almost certainly want in a
production application. There are several 3rd party Python crypto
libraries that provide more secure SSL out of the box, for example M2Crypto.

-- 
  Heikki Toivonen



More information about the Python-list mailing list