SSL on Windows?

Robert Towster rtowster at emerging.com
Thu May 11 16:54:26 EDT 2000


I need to do this too..
I DL M2Crypto windows binary release (0.4 because 0.5 release RSN)
now I only need to do a SSL client (to hit an existing server). I
started
playing with the demos.. (specifically echo.py)
I keep getting PRNG not seeded. (see traceback below)
The line that apparently seeds PRNG is this:
Rand.load_file('../randpool.dat', -1)
I can change it so that it points to a different file and then the
script will
make the SSL connection and get the web page but it causes an invalid
page fault
in python.dll

My ultimate destination is to make a script that will do a https post to
a URL
and get a response.. 
I can get a perl library to do this.. but.. I wanna use python =)


------------------------------------------

C:\Program Files\Python\Lib\demo\ssl>"c:\program
files\python\python.exe" echo.py
LOOP: SSL connect: before/connect initialization
LOOP: SSL connect: SSLv3 write client hello A
LOOP: SSL connect: SSLv3 read server hello A
LOOP: SSL connect: SSLv3 read server certificate A
LOOP: SSL connect: SSLv3 read server key exchange A
LOOP: SSL connect: SSLv3 read server done A
INFO: SSL connect: SSLv3 write client key exchange A
Traceback (innermost last):
  File "echo.py", line 37, in ?
    s.connect((host, port))
  File "C:\Program Files\Python\Lib\M2Crypto\SSL\Connection.py", line
81, in con
nect
    return self._check_ssl_return(m2.ssl_connect(self.ssl))
  File "C:\Program Files\Python\Lib\M2Crypto\SSL\Connection.py", line
48, in _ch
eck_ssl_return
    raise Err.SSLError(Err.get_error_code(), self.socket.getpeername())
M2Crypto.Err.SSLError: SSLEAY_RAND_BYTES: ('10.11.75.10', 443): PRNG not
seeded

C:\Program Files\Python\Lib\demo\ssl>
------------------------------------------



Ng Pheng Siong wrote:
> 
> According to The Dude  <calvin at studcs.uni-sb.de>:
> > There is an SSL interface for Python. First you will need an SSL
> > library,
> > for example from www.openssl.org, then the SSL wrapper from
> > http://home.att.net/~nvsoft1/ssl_wrapper.html
> > You will need Perl for Win32 (http://www.activestate.com/ActivePerl)
> > to install OpenSSL on Windows.
> 
> <plug>
> 
> M2Crypto at http://www.post1.com/home/ngps/m2
> 
> Gives you OpenSSL's crypto, SSL and S/MIME.
> 
> </plug>
> 
> Cheers.
> --
> Ng Pheng Siong <ngps at post1.com> * http://www.post1.com/home/ngps



More information about the Python-list mailing list