Hi,

So It's my understanding that you're talking about things like
s_client, genrsa, ...

- Yes

Those applications don't support multiple connections as far as I
know.  Are you saying that you run 2 at the same time and when
1 stops that other fails?

- Yes

Are you saying that multiple applications, which happen to started
in their own thread instead of their own process, share the same
static variables instead of each having it's own copy?

- Yes, so the SSL applications cannot be run in threads sharing the 
same address space. The solution would be to force each thread to 
have a copy of the shared variables.

Thanks for the clarification.
Valentin Radulescu




On Wednesday, July 9, 2014 1:59 AM, Kurt Roeckx via RT <[email protected]> wrote:
 


On Wed, Jul 09, 2014 at 12:36:45AM +0200, valentin radulescu via RT wrote:
> Hi,
> 
> In Operating Systems that are thread based, in which all threads share the 
> same memory address space, in case of multiple connections, calling 
> apps_shutdown by one connection will cause the reset of static variables 
> state and md in md_rand.c for all connections. 

So It's my understanding that you're talking about things like
s_client, genrsa, ...

Those applications don't support multiple connections as far as I
know.  Are you saying that you run 2 at the same time and when
1 stops that other fails?

Are you saying that multiple applications, which happen to started
in their own thread instead of their own process, share the same
static variables instead of each having it's own copy?

If that's all the case, I think your problem is that you try to do
something that's just not supported.  If you want to use the
library in 2 applications you need to either:
- Turn those 2 applications in 1 application with 2 threads, and
  do what you normally do with threads
- Make each application have a copy of the local variables.  That
  is, they can share the text segment but each needs it's own copy
  of the data and bss.


Kurt
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to