comparison src/event/ngx_event_openssl.h @ 6492:3b77efe05b92

SSL: SSLeay_version() is deprecated in OpenSSL 1.1.0. SSLeay_version() and SSLeay() are no longer available if OPENSSL_API_COMPAT is set to 0x10100000L. Switched to using OpenSSL_version() instead. Additionally, we now compare version strings instead of version numbers, and this correctly works for LibreSSL as well.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 31 Mar 2016 23:38:38 +0300
parents 382fc7069e3a
children 8a34e92d8ab5
comparison
equal deleted inserted replaced
6491:45f2385a47e6 6492:3b77efe05b92
34 34
35 35
36 #if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) 36 #if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
37 #undef OPENSSL_VERSION_NUMBER 37 #undef OPENSSL_VERSION_NUMBER
38 #define OPENSSL_VERSION_NUMBER 0x1000107fL 38 #define OPENSSL_VERSION_NUMBER 0x1000107fL
39 #endif
40
41
42 #if (OPENSSL_VERSION_NUMBER >= 0x10100001L)
43
44 #define ngx_ssl_version() OpenSSL_version(OPENSSL_VERSION)
45
46 #else
47
48 #define ngx_ssl_version() SSLeay_version(SSLEAY_VERSION)
49
39 #endif 50 #endif
40 51
41 52
42 #define ngx_ssl_session_t SSL_SESSION 53 #define ngx_ssl_session_t SSL_SESSION
43 #define ngx_ssl_conn_t SSL 54 #define ngx_ssl_conn_t SSL