diff options
author | Russell Bryant <russell@russellbryant.com> | 2009-07-08 15:17:19 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2009-07-08 15:17:19 +0000 |
commit | 0e8c6302240c78d6b86284aaeab25693c1c6d444 (patch) | |
tree | 64d823c71b2b948b5a724c62f8c4d49fc1d7640b /res/res_jabber.c | |
parent | acc8bbbaf53e0c6e1ef45e4b6195f8c67621da8a (diff) |
Move OpenSSL initialization to a single place, make library usage thread-safe.
While doing some reading about OpenSSL, I noticed a couple of things that
needed to be improved with our usage of OpenSSL.
1) We had initialization of the library done in multiple modules. This has now
been moved to a core function that gets executed during Asterisk startup.
We already link OpenSSL into the core for TCP/TLS functionality, so this
was the most logical place to do it.
2) OpenSSL is not thread-safe by default. However, making it thread safe is
very easy. We just have to provide a couple of callbacks. One callback
returns a thread ID. The other handles locking. For more information,
start with the "Is OpenSSL thread-safe?" question on the FAQ page of
openssl.org.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_jabber.c')
-rw-r--r-- | res/res_jabber.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c index c918d2e09..e7feb37df 100644 --- a/res/res_jabber.c +++ b/res/res_jabber.c @@ -639,10 +639,6 @@ static int aji_tls_handshake(struct aji_client *client) ast_debug(1, "Starting TLS handshake\n"); - /* Load encryption, hashing algorithms and error strings */ - SSL_library_init(); - SSL_load_error_strings(); - /* Choose an SSL/TLS protocol version, create SSL_CTX */ client->ssl_method = SSLv3_method(); client->ssl_context = SSL_CTX_new(client->ssl_method); |