REPOST: Re: SSL Sockets in Windows

Syver Enstad syver-en+usenet at online.no
Sat Dec 29 16:03:16 CET 2001


Gerhard Häring <gh_pythonlist at gmx.de> writes:

> Le 28/12/01 à 07:18, Syver Enstad écrivit:
> > 
> > Hi Al, I'm not exactly an expert on SSL :-). I know it's what goes
> on
> 
> > behind the scenes when my browser uses an https url and
> communication
> 
> > is encrypted and whatnot. 
> > 
> > Do you have (or can you refer me to) a quick
> > example to check that SSL is indeed working on Python?
> 
> You can check pretty easily if your Python is compiled with SSL
> support:
> 
>     
>     'ssl' in dir(socket)

Yes, returns true (1)

> If so, you should be able to fetch a HTML page with the urllib module:
> 
> 
>     print urllib.urlopen("https://www.sf.net/").read()

Yes, this fetches the front page of sourceforge, which says that I'm
not logged in.

What would happen if I didn't have SSL installed. 

You see I compiled up a new version of _socket.pyd with VC++ 6 and
this time I specified that SSL shouldn't be compiled in. 'ssl' in
dir(socket) still returns true, and the download goes without a
hitch too. I haven't checked with a packet sniffer though.

> reduce(lambda x,y:x+y,map(lambda
> x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

Cute, and true.

-- 

Vennlig hilsen 

Syver Enstad

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool0-nwblwi.newsops.execpc.com!newsfeeds.sol.net!news-out.visi.com!hermes.visi.com!news.maxwell.syr.edu!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: Syver Enstad <syver-en+usenet at online.no>
Newsgroups: comp.lang.python
Subject: cmsg cancel <u666qkr0r.fsf at online.no>
Control: cancel <u666qkr0r.fsf at online.no>
Date: Mon, 31 Dec 2001 02:12:08 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.u666qkr0r.fsf at online.no>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009774749 27193 211.57.49.2 (31 Dec 2001 04:59:09 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 04:59:09 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list