* Initializes the OpenSSL library. */
| 56 | * Initializes the OpenSSL library. |
| 57 | */ |
| 58 | void InitializeOpenSSL() |
| 59 | { |
| 60 | if (l_SSLInitialized) |
| 61 | return; |
| 62 | |
| 63 | SSL_library_init(); |
| 64 | SSL_load_error_strings(); |
| 65 | |
| 66 | SSL_COMP_get_compression_methods(); |
| 67 | |
| 68 | #if OPENSSL_VERSION_NUMBER < 0x10100000L |
| 69 | l_Mutexes = new std::mutex[CRYPTO_num_locks()]; |
| 70 | CRYPTO_set_locking_callback(&OpenSSLLockingCallback); |
| 71 | CRYPTO_set_id_callback(&OpenSSLIDCallback); |
| 72 | #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ |
| 73 | |
| 74 | l_SSLInitialized = true; |
| 75 | } |
| 76 | |
| 77 | static void InitSslContext(const Shared<boost::asio::ssl::context>::Ptr& context, const String& pubkey, const String& privkey, const String& cakey) |
| 78 | { |
no outgoing calls
no test coverage detected