Newbie trying to use HTTPS, pls help

Josiah Carlson jcarlson at nospam.uci.edu
Fri Mar 26 17:05:22 EST 2004


Python 2.2 on windows does not support SSL.  Python 2.3 on windows 
mostly does (there are a few SSL bits that don't work quite so well).

Check out TLS Lite:
http://trevp.net/tlslite/
and M2Crypto:
http://sandbox.rulemaker.net/ngps/m2/

  - Josiah


> Hi,
> I think the sockets module has not been compiled for ssl. That's my guess at
> why this won't work...
> Can anyone suggest a better way..
> 
> set up params & headers
> ....
> 
>>>>conn = httplib.HTTPSConnection("betting.sports555.com") // imaginary url
>>>>conn.request("POST", "/cgi-bin/login", params, headers)
> 
> Traceback (most recent call last):
>   File "<pyshell#28>", line 1, in ?
>     conn.request("POST", "/cgi-bin/login", params, headers)
>   File "D:\Python22\lib\httplib.py", line 701, in request
>     self._send_request(method, url, body, headers)
>   File "D:\Python22\lib\httplib.py", line 723, in _send_request
>     self.endheaders()
>   File "D:\Python22\lib\httplib.py", line 695, in endheaders
>     self._send_output()
>   File "D:\Python22\lib\httplib.py", line 581, in _send_output
>     self.send(msg)
>   File "D:\Python22\lib\httplib.py", line 548, in send
>     self.connect()
>   File "D:\Python22\lib\httplib.py", line 945, in connect
>     ssl = socket.ssl(realsock, self.key_file, self.cert_file)
> AttributeError: 'module' object has no attribute 'ssl'



More information about the Python-list mailing list