multi-thread support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

multi-thread support

Randy Turner

Hi All,

I just wanted to verify that, as of OpenSSL 0.9.8a, any OpenSSL data  
facility that utilizes "STACK_OF" as a container for different types  
of objects, the routines that reference these "stacks" do not support  
multiple threads accessing the same "stack". Is this the case?  I  
didn't see any mutex/user callback support in stack.c.

Thanks!
Randy

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: multi-thread support

Alain Damiral
Check this link:

http://www.openssl.org/docs/crypto/threads.html

Thread support is there, but is platform dependent. There is a file
called th-lock.c under crypto/threads that contains some definitions for
thread support on a few platforms. I haven't tested this but it compiles
so it must work :)



Randy Turner wrote:

>
> Hi All,
>
> I just wanted to verify that, as of OpenSSL 0.9.8a, any OpenSSL data  
> facility that utilizes "STACK_OF" as a container for different types  
> of objects, the routines that reference these "stacks" do not support  
> multiple threads accessing the same "stack". Is this the case?  I  
> didn't see any mutex/user callback support in stack.c.
>
> Thanks!
> Randy
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]



--
Alain Damiral,

I hope this message makes me look like a very intelligent person

Université Catholique de Louvain - student
alain.damiral'at'student.info.ucl.ac.be

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: multi-thread support

ldb-3
In reply to this post by Randy Turner
 From the installation notes .. It should already be there if you have things
are normal.

  Note on multi-threading
  -----------------------

  For some systems, the OpenSSL Configure script knows what compiler options
  are needed to generate a library that is suitable for multi-threaded
  applications.  On these systems, support for multi-threading is enabled
  by default; use the "no-threads" option to disable (this should never be
  necessary).

  On other systems, to enable support for multi-threading, you will have
  to specify at least two options: "threads", and a system-dependent option.
  (The latter is "-D_REENTRANT" on various systems.)  The default in this
  case, obviously, is not to include support for multi-threading (but
  you can still use "no-threads" to suppress an annoying warning message
  from the Configure script.)



Randy Turner wrote:

>
> Hi All,
>
> I just wanted to verify that, as of OpenSSL 0.9.8a, any OpenSSL data  
> facility that utilizes "STACK_OF" as a container for different types  of
> objects, the routines that reference these "stacks" do not support  
> multiple threads accessing the same "stack". Is this the case?  I  
> didn't see any mutex/user callback support in stack.c.
>
> Thanks!
> Randy
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: multi-thread support

JoelKatz
In reply to this post by Randy Turner

> I just wanted to verify that, as of OpenSSL 0.9.8a, any OpenSSL data
> facility that utilizes "STACK_OF" as a container for different types
> of objects, the routines that reference these "stacks" do not support
> multiple threads accessing the same "stack". Is this the case?  I
> didn't see any mutex/user callback support in stack.c.

        I believe OpenSSL's stacks work just like pretty much everything. The
results are undefined if you modify an object in one thread while another
thread is or might be using it. However, you can read an object in any
number of threads at the same time. If you write code where it's possible
for a stack to be modified in one thread while another thread might be using
that same stack, you will need to use some kind of synchronization.

        DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]