SSL error: 2.1.1 works but 2.2 doesn't

Ng Pheng Siong ngps at vista.netmemetic.com
Wed Apr 10 11:15:14 EDT 2002


According to Walter Miller  <w3miller at yahoo.com>:
> Apologies if this has been discussed/solved already. 
> I looked for prior postings but haven't found a
> solution for fixing this error I'm getting with
> _socket.pyd on 2.2.
>
> doc =
> urllib2.urlopen("https://www.medi-cal.ca.gov").read()
> print doc

ngps at vista:~$ python
Python 2.2 (#7, Mar 31 2002, 23:17:41) 
[GCC 2.95.3 20010315 (release) [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> from M2Crypto import m2urllib
>>> doc = m2urllib.urlopen('https://www.medi-cal.ca.gov').read()
send: 'GET / HTTP/1.1\r\n'
send: 'Host: www.medi-cal.ca.gov:443\r\n'
send: 'Accept-Encoding: identity\r\n'
send: 'User-agent: Python-urllib/1.15\r\n'
send: '\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: Microsoft-IIS/5.0
header: Date: Wed, 10 Apr 2002 15:15:04 GMT
header: Content-Length: 36424
header: Content-Type: text/html
header: Cache-control: private
>>> print doc
[ bunch of html scrolled past ]
<style type="text/css">
<!--
.BannerStyle A:link {color:white;text-decoration:none;style:bold}
.BannerStyle A:visited {color:white;text-decoration:none;style:bold}
.BannerStyle A:active {color:white;text-decoration:none;style:bold} 
.BannerStyle A:hover {color:white;text-decoration:underline}

.replace A:link {color:white;text-decoration:none;style:bold}
.replace A:visited {color:white;text-decoration:none;style:bold}
.replace A:active {color:white;text-decoration:none;style:bold} 
.replace A:hover {color:white;text-decoration:none}

>>> 

ngps at vista:~$ uname -a
FreeBSD vista.netmemetic.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Tue Feb 26 00:06:08 SGT 2002     
root at vista.netmemetic.com:/usr/local/sys-src/sys/compile/VISTA  i386


I imagine this should also work on Win2K. Grab the M2Crypto Win32 package and try it out.

Cheers.


-- 
Ng Pheng Siong <ngps at netmemetic.com> * http://www.netmemetic.com




More information about the Python-list mailing list