Mercurial > hg > nginx-quic
comparison src/event/ngx_event_openssl.h @ 7337:cab37803ebb3
SSL: fixed build with LibreSSL 2.8.0 (ticket #1605).
LibreSSL 2.8.0 "added const annotations to many existing APIs from OpenSSL,
making interoperability easier for downstream applications". This includes
the const change in the SSL_CTX_sess_set_get_cb() callback function (see
9dd43f4ef67e), which breaks compilation.
To fix this, added a condition on how we redefine OPENSSL_VERSION_NUMBER
when working with LibreSSL (see 382fc7069e3a). With LibreSSL 2.8.0,
we now set OPENSSL_VERSION_NUMBER to 0x1010000fL (OpenSSL 1.1.0), so the
appropriate conditions in the code will use "const" as it happens with
OpenSSL 1.1.0 and later versions.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 10 Aug 2018 20:49:06 +0300 |
parents | ba971deb4b44 |
children | 548a63b354a2 |
comparison
equal
deleted
inserted
replaced
7336:1cd63ae46243 | 7337:cab37803ebb3 |
---|---|
34 #define NGX_SSL_NAME "OpenSSL" | 34 #define NGX_SSL_NAME "OpenSSL" |
35 | 35 |
36 | 36 |
37 #if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) | 37 #if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) |
38 #undef OPENSSL_VERSION_NUMBER | 38 #undef OPENSSL_VERSION_NUMBER |
39 #if (LIBRESSL_VERSION_NUMBER >= 0x2080000fL) | |
40 #define OPENSSL_VERSION_NUMBER 0x1010000fL | |
41 #else | |
39 #define OPENSSL_VERSION_NUMBER 0x1000107fL | 42 #define OPENSSL_VERSION_NUMBER 0x1000107fL |
43 #endif | |
40 #endif | 44 #endif |
41 | 45 |
42 | 46 |
43 #if (OPENSSL_VERSION_NUMBER >= 0x10100001L) | 47 #if (OPENSSL_VERSION_NUMBER >= 0x10100001L) |
44 | 48 |