On Thu, Dec 27, 2001 at 11:33:33AM -0500, Sankaran Narayanan wrote: > > Out of curiosity, doesn't one also have to lock the SSL* itself against > > concurrent access during read/write operations, or does OpenSSL guard it > > for the programmer? > > sorry if i am spamming with naive questions, but: > Do i need locking, if all i do is 'read' in one thread (from remote) and > 'write' in another thread (to remote)? > > i want to use "blocking read" so that the reader will be blocked in the > SSL_read call, while i do a SSL_write from my writer (hence locks wont > work) - i did some basic tests, and it seems to work fine. > > should i worry about any race issues? any comment is appreciated.
You may run into problems. As soon as a renegotiation takes place, SSL_read() will also trigger write operations, that may interfere with the other SSL_write() operations and vice versa. In most cases, no renegotiation takes place, so you may run your tests successfully but that is no proof that the concept is correct. Best regards, Lutz -- Lutz Jaenicke [EMAIL PROTECTED] BTU Cottbus http://www.aet.TU-Cottbus.DE/personen/jaenicke/ Lehrstuhl Allgemeine Elektrotechnik Tel. +49 355 69-4129 Universitaetsplatz 3-4, D-03044 Cottbus Fax. +49 355 69-4153 ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]