Re: [openssl-users] Guidance on proper usage of OpenSSL_add_all_digests

2016-03-02 Thread chris . gray
> On Wed, Mar 2, 2016 at 12:27 PM, Neptune wrote: > [...] > You can perform initialization in a static C++ ctor, but it can be > tricky because the C++ committee has never addressed the problem of > initialization order across translation units. Also see What's the > "static

Re: [openssl-users] Guidance on proper usage of OpenSSL_add_all_digests

2016-03-02 Thread Thomas Francis, Jr.
> On Mar 2, 2016, at 12:27 PM, Neptune wrote: > > Using OpenSSL 1.0.1l > > I just learned the painful way that OpenSSL_add_all_digests() is not a > thread-safe function. I had been calling this in the constructor of a class > providing hash functions for multiple threads.

Re: [openssl-users] Guidance on proper usage of OpenSSL_add_all_digests

2016-03-02 Thread Jeffrey Walton
> Finally, for the crypto components, like SHA... I don't believe they > need explicit initialization unless you are doing something like > changing the default implementation from software to an engine. The > SSL part of the library allows you to explicitly add selected > algorithms to control

Re: [openssl-users] Guidance on proper usage of OpenSSL_add_all_digests

2016-03-02 Thread Jeffrey Walton
On Wed, Mar 2, 2016 at 12:27 PM, Neptune wrote: > Using OpenSSL 1.0.1l > > I just learned the painful way that OpenSSL_add_all_digests() is not a > thread-safe function. I had been calling this in the constructor of a class > providing hash functions for multiple threads. My

[openssl-users] Guidance on proper usage of OpenSSL_add_all_digests

2016-03-02 Thread Neptune
Using OpenSSL 1.0.1l I just learned the painful way that OpenSSL_add_all_digests() is not a thread-safe function. I had been calling this in the constructor of a class providing hash functions for multiple threads. My question is, how do I know if a thread instantiating my class has called