comparison src/event/ngx_event_openssl.h @ 6485:382fc7069e3a

SSL: reasonable version for LibreSSL. LibreSSL defines OPENSSL_VERSION_NUMBER to 0x20000000L, but uses an old API derived from OpenSSL at the time LibreSSL forked. As a result, every version check we use to test for new API elements in newer OpenSSL versions requires an explicit check for LibreSSL. To reduce clutter, redefine OPENSSL_VERSION_NUMBER to 0x1000107fL if LibreSSL is used. The same is done by FreeBSD port of LibreSSL.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 31 Mar 2016 23:38:29 +0300
parents 97f102a13f33
children 3b77efe05b92
comparison
equal deleted inserted replaced
6484:4b420f9c4c5d 6485:382fc7069e3a
29 #include <openssl/rsa.h> 29 #include <openssl/rsa.h>
30 #include <openssl/x509.h> 30 #include <openssl/x509.h>
31 #include <openssl/x509v3.h> 31 #include <openssl/x509v3.h>
32 32
33 #define NGX_SSL_NAME "OpenSSL" 33 #define NGX_SSL_NAME "OpenSSL"
34
35
36 #if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
37 #undef OPENSSL_VERSION_NUMBER
38 #define OPENSSL_VERSION_NUMBER 0x1000107fL
39 #endif
34 40
35 41
36 #define ngx_ssl_session_t SSL_SESSION 42 #define ngx_ssl_session_t SSL_SESSION
37 #define ngx_ssl_conn_t SSL 43 #define ngx_ssl_conn_t SSL
38 44