secure login on web

Olav Bandmann olav at sics.se
Thu May 3 12:00:51 EDT 2001


First of all, check if ssl *is* installed in the socket module (n.b.).
You can do this by interactively giving the following two lines:

import socket
hasattr(socket, "ssl")                                       

The result should be 1 if ssl support is installed in
the socket module. If it isn't, and you are on a Linux
platform, you need to (not just install a binary, but to)
recompile the python source code *after* you installed
OpenSSL on your machine (I guess something similar could
work under windows?). If this for some reason doesn't work,
you may have to manually uncomment ssl support in one of
the configuration files used when recompiling Python
(this was not neccessary in my case!).
How, and where, this is done, is very well documented
in the Python source code install documentation.

By the way, to increase the chances for success, here
are the versions I used when I did this

Linux Redhat 6.2
Python 2.1
OpenSSL 0.9.6

Don't forget to check out "webbot.py".

Chris Gonnerman wrote:
> 
> I have a fresh install of Python 2.1, and I already had OpenSSL installed,
> but I don't find any SSL modules installed, nor does the source archive
> seem to have one.
> 
> Am I looking in the wrong place?
> 
> ----- Original Message -----
> From: "Olav Bandmann" <olav at sics.se>
> Newsgroups: comp.lang.python
> To: <python-list at python.org>
> Sent: Thursday, May 03, 2001 5:00 AM
> Subject: Re: secure login on web
> 
> > Ben Hutchings wrote:
> > >
> > > Brian Lee <senux at senux.nospam> writes:
> > >
> > > > Hi,
> > > >
> > > > With Python, I want to write a code to make a secure login
> > > > on web. How can I do that with Python? Is there any related
> > > > Python module?
> > >
> > > It's not quite clear to me whether you're talking about the client or
> > > server end of things.  The httplib module is useful for web clients.
> > > For the server end there are various options - CGI (with the help of
> > > the CGI module), the Zope server, mod_snake or mod_python for Apache,
> > > or similar extensions for IIS.
> >
> > If you're talking about client side ("session-persistent") SSL login,
> > you
> > should check out "webbot.py" at
> > http://starship.python.net/crew/jrush/Webbot/
> > as an example.
> >
> > > I assume by 'secure login' you mean that login information should be
> > > sent over an SSL connection.  httplib doesn't support SSL 'out of the
> > > box', but I think you can add that capability using one of the modules
> > > listed at <http://www.vex.net/parnassus/apyllo.py?find=ssl>.
> >
> > You will need to install OpenSSL anyway (if you haven't installed it
> > already).
> > After that, all you need to do is to recompile your fresh copy of Python
> > 2.1.
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
> >




More information about the Python-list mailing list