RE: Error Handling in a Multithreaded Environment, Failures effecting non-associated connections

2014-08-15 Thread Salz, Rich
Just so I make sure I understand, I just need to do something like: while ((err = ERR_get_error())); When I switch work and everything will be ok? Simpler to just call ERR_clear_error() -- Principal Security Engineer Akamai Technologies, Cambridge MA IM: rs...@jabber.me Twitter: RichSalz

Re: Error Handling in a Multithreaded Environment, Failures effecting non-associated connections

2014-08-15 Thread David Hinkle
Thanks! On Fri, Aug 15, 2014 at 10:50 AM, Salz, Rich rs...@akamai.com wrote: Just so I make sure I understand, I just need to do something like: while ((err = ERR_get_error())); When I switch work and everything will be ok? Simpler to just call ERR_clear_error() -- Principal Security

RE: Error Handling in a Multithreaded Environment, Failures effecting non-associated connections

2014-08-14 Thread Michael Wojcik
Some of the control logic in OpenSSL does peek at the thread error queue to decide what caused a lower-level failure. For example, see the code for PEM_bytes_read_bio in pem_lib.c. There are a handful of other files that call ERR_peek_error(). I don't know whether it's documented anywhere, but

RE: Error Handling in a Multithreaded Environment, Failures effecting non-associated connections

2014-08-14 Thread Salz, Rich
Ø I don't know whether it's documented anywhere, but I'd say yes, it's probably good to drain the error queue each time a thread picks up a new piece of work. This hadn't occurred to me before your note - I'll have to investigate whether any of my code needs to do this as well. Yes,

Re: Error Handling in a Multithreaded Environment, Failures effecting non-associated connections

2014-08-14 Thread David Hinkle
This is where I would have expected to find it: https://www.openssl.org/docs/crypto/threads.html I would write the patch but I think someone more experienced with the library should lay out exactly what the semantics need be. On Thu, Aug 14, 2014 at 4:33 PM, Salz, Rich rs...@akamai.com wrote:

Re: Error Handling in a Multithreaded Environment, Failures effecting non-associated connections

2014-08-14 Thread David Hinkle
Just so I make sure I understand, I just need to do something like: while ((err = ERR_get_error())); When I switch work and everything will be ok? On Thu, Aug 14, 2014 at 4:44 PM, David Hinkle hin...@cipafilter.com wrote: This is where I would have expected to find it: