Using SSL in socket module.

Carl Waldbieser waldbie at yahoo.com
Sat Nov 26 16:24:06 EST 2005


I am trying to understand how the SSL object in the socket module is
supposed to be used.  From looking at the documentation, I can work out
that you need to pass a socket into the ssl() function, and you get back an
SSL object that has write() and read() methods similar to a file object.

However, what I don't get is the context you are supposed to use this object
in.  I thought that SSL was like a socket, but the transmission would be
encrypted.  So I guess I was expecting the SSL object to look like a socket
object-- so that you could just use an SSL object as a drop-in replacement
for a socket object when you wanted to encrypt the transmission.

Am I missing something fundamental here?

Thanks for any pointers.



More information about the Python-list mailing list