-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hmmm. Sent this from the wrong email account before! This is a CC of the
mail I sent to the tlslite list.

Jason: Could you try the fix below and very it's the same issue on
MacOS? Thanks.

I'm seeing a problem in my application with the initial SSL handshaking
failing very quickly. I have personally reproduced this on NetBSD 3.1
i386 running inside a VMWare virtual machine. I believe this is the same
issue as another developer reported when running the code on MacOS X.

When this happens, no kind of error/exception is indicated to the SSL
application; setHandshakeOp returns normally. However, as soon as the
application attempts to write any data to the remote client, an
exception is thrown indicating that the connection is closed (because
the handshaking code never completed).

It seems that this code in TLSRecordLayer.py::_getNextRecord is responsible:

            try:
                s = self.sock.recv(recordHeaderLength-len(bytes))
            except socket.error, why:
                if why[0] == errno.EWOULDBLOCK:
                    yield 0
                    continue
                else:
                    raise

If I comment out the "yield 0" in the above code, then the whole SSL
session works perfectly, although I assume that the code is spinning at
100% CPU due to continual polling of the non-blocking socket when no
data is available.

Does anyone know the correct fix for this issue?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF772Nhk3bo0lNTrURAgBOAJ9f9a6Dlu2o+23A1AgBGVMjbotK0wCfSKox
d0apC0zAt1q7w47MTgDepE0=
=nJ4N
-----END PGP SIGNATURE-----
_________________________________________________
tmda-workers mailing list ([email protected])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to