Adam Crain
2015-09-25 17:38:16 UTC
Hi all,
I have an application where, optionally, I enable ASIO's TLS support in my
build. When not enabled, I actually use openssl-crypto functions in a
multi-threaded environment and have my own implementation of the
locking/thread id functions. Specifically, I need the locking for the
CSPRNG even if I'm not using asio::ssl.
1) Am I correct in understanding when ASIOs multi-threading init happens? I
believe it to be happening during static initialization if I've included
<asio/ssl.hpp>. Is this correct?
2) I believe that there is no way to turn this off, correct? Since I can't
control static-initialization order I've opted to make my own
initialization optional.
Do you think this a reasonable thing to do?
thanks,
Adam
I have an application where, optionally, I enable ASIO's TLS support in my
build. When not enabled, I actually use openssl-crypto functions in a
multi-threaded environment and have my own implementation of the
locking/thread id functions. Specifically, I need the locking for the
CSPRNG even if I'm not using asio::ssl.
1) Am I correct in understanding when ASIOs multi-threading init happens? I
believe it to be happening during static initialization if I've included
<asio/ssl.hpp>. Is this correct?
2) I believe that there is no way to turn this off, correct? Since I can't
control static-initialization order I've opted to make my own
initialization optional.
Do you think this a reasonable thing to do?
thanks,
Adam
--
J Adam Crain - Partner
<http://www.automatak.com>
PGP 4096R/E2984A0C <https://www.automatak.com/keys/jadamcrain.asc> 2013-05-03
J Adam Crain - Partner
<http://www.automatak.com>
PGP 4096R/E2984A0C <https://www.automatak.com/keys/jadamcrain.asc> 2013-05-03