mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -44,6 +44,7 @@ int ast_indications_reload(void);/*!< Provided by indications.c */
|
||||
void ast_stun_init(void); /*!< Provided by stun.c */
|
||||
int ast_cel_engine_init(void); /*!< Provided by cel.c */
|
||||
int ast_cel_engine_reload(void); /*!< Provided by cel.c */
|
||||
int ast_ssl_init(void); /*!< Porvided by ssl.c */
|
||||
|
||||
/*!
|
||||
* \brief Reload asterisk modules.
|
||||
|
Reference in New Issue
Block a user