mirror of
https://github.com/asterisk/asterisk.git
synced 2026-04-27 09:12:42 +00:00
Backport pjsip/pjproject#4941 which fixes a build/link failure when compiling against OpenSSL < 1.1.0 (e.g. OpenSSL 1.0.2k on CentOS 7). Two symbols introduced in OpenSSL 1.1.x were called unconditionally in ssl_sock_ossl.c without version guards: - `TLS_method()` in `init_ossl_ctx()` is now guarded with `OPENSSL_VERSION_NUMBER < 0x10100000L`, falling back to `SSLv23_method()` on older OpenSSL. - `SSL_CTX_set_ciphersuites()` is now guarded with `OPENSSL_VERSION_NUMBER >= 0x1010100fL` since this function was introduced in OpenSSL 1.1.1 and is absent in 1.0.x. Without this fix, linking fails with: undefined reference to `TLS_method' undefined reference to `SSL_CTX_set_ciphersuites' when building Asterisk with bundled pjproject on systems such as CentOS 7 with OpenSSL 1.0.2k. Resolves: #1892