On Wed, Dec 26, 2001 at 02:40:12PM -0500, Sankaran Narayanan wrote: > I am adding TLS support to one of our servers, and for some legacy reasons > i need to share the main SSL pointer across several threads. in the > dispatcher thread i use SSL_dup and then allow the worker threads to > free the dup'ed SSL object when it is done... > > however, SSL_write's on the dup'ed object fail (null pointer write). a bit > of investigation using VCd reveals that the problem s3_pkt.c, function > do_ssl_write > the s->s3 object's write buffer is null... > > am i missing something or is there a better way to share SSL connections > across threads? any help is appreciated.
I am afraid that SSL_dup() does not fulfill your requirements. You can only have one datastream through one SSL object at a time, so that you cannot have two threads concurrently accessing one SSL object. 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]