OpenSSL and Multiple Threads?
Hi, I have an application attempting to use SSL connections. I have verified that the Lispworks demo code runs perfectly. And I even recoded it to a binary stream version, instead of text based, and that runs fine too. The only difference between the demo and my application is that I spawn off a separate reader thread for the socket stream on both client and server sides so that full-duplex communications can occur between them. The original thread that opened the socket stream remains only a writer, and the reader thread performs only reading. Both operate on the same stream object. This works just fine when not using an SSL connection. When I try to open an SSL connection between client and server I get numerous different and random SSL errors showing up during the connection attempt, mostly on the client side, but sometimes on the server side too. Errors from SSL are complaining about unexpected codes, wrong versions, blocks too large, etc. Quite a random collection, and hardly repeatable. The socket shuts down after this, and I never even get the chance to exchange a hello between client and server. So I'm beginning to get the idea that OpenSSL is not reentrant, and is meant for a conversational style where messages are followed by replies in strict cyclic order. That's the way the LW demos behave and they work just fine. Does anyone out there have any knowledge about this situation with OpenSSL? Dr. David McClain dbm@refined-audiometrics.com