[PythonCE] [ANN} PyOpenSSL

Ajay abra9823 at mail.usyd.edu.au
Fri Oct 1 01:17:21 CEST 2004

Quoting Mark Eichin <eichin at gmail.com>:

> Is that enough to make urllib.urlopen work with https urls, or is it
> lower level than that?

i don't know how urllib works so cant answer that one.
But you can use PyOpenSSL to open a socket connection to the server and
then write a request to the server.
So your code may be something like

from OpenSSL.SSL import *
import socket
import rand

#create context
ctx = Context(SSLv23_METHOD)
#load certificate, certificate chain and keys
#you will also need to seed the PRNG,WinCE devices dont have any source for
#random events, so you can specify a file with random data
#create socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
conn = Connection(ctx, sock)
conn.connect(("https://www.verisign.com", xxx))

i dont remember the syntax off my head, so the above code may be
syntactically wrong.
but that is one way to go about opening a HTTPS connection.


> On Thu, 30 Sep 2004 15:56:54 +1000, Ajay <abra9823 at mail.usyd.edu.au>
> wrote:
> > hi!
> >
> > i have built PyOpenSSL for a Toshiba e740 (it uses XScale, but i think
> > thats compatible with a StrongArm).
> > i have put up the binaries along with a quick HOWTO for anyone who
> wants to
> > build from source on my webpage at
> > http://www.cs.usyd.edu.au/~abrar1/resources.html
> >
> > cheers
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> > _______________________________________________
> > PythonCE mailing list
> > PythonCE at python.org
> > http://mail.python.org/mailman/listinfo/pythonce
> >
> --
> _Mark_ <eichin at thok.org> <eichin at gmail.com>

This message was sent using IMP, the Internet Messaging Program.

More information about the PythonCE mailing list