From: Graham B. <gb...@po...> - 2001-10-24 15:51:02
|
On Wed, Oct 24, 2001 at 04:31:08PM +0100, Graham Barr wrote: > On Wed, Oct 24, 2001 at 04:13:43PM +0100, Chris Ridd wrote: > > Graham Barr <gb...@po...> wrote: > > > ----- Forwarded message from Todd Woods <tw...@di...> ----- > > > > > > Date: Wed, 24 Oct 2001 09:18:20 -0500 (CDT) > > > To: gb...@po... > > > From: Todd Woods <tw...@di...> > > > Subject: perl-ldap and multiple start_tls errors > > > > > > Couldn't find anything using google on this error so e-mailing > > > you. 8) > > > I can't start more then 1 LDAP bind using start_tls in a perl > > > script. It errors out from IO::Socket::SSL when issuing start_tls on the > > > subsequent ldap objects event if I do an unbind first. > > > Reading under IO::Socket::SSL I noticed that it mentions you can > > > only have one SSL context at a given time. I've seen scripts (haven't run > > > > Yeah, I saw that too. I suspect that only having a single SSL context means > > you can only have a single SSL connection at a time. > > IO::Socket::SSL does create a new context each time, but it stores it in > a global. I wonder it the problem is that on the second connect the > refcount for the first context goes to zero and it is freed, thus causing > problems for Net::SSLeay on the inital connection. > > It may be worth trying to save the contents of $IO::Socket::SSL::SSL_Context_obj, > after calling context_init, in the ldap object. OK, this is a hack, but it seems to work around the limitation in IO::Socket::SSL Graham. |