Welcome! Log In Create A New Profile


[nginx] SSL: fixed build with LibreSSL 2.8.0 (ticket #1605).

Maxim Dounin
August 10, 2018 02:54PM
details: http://hg.nginx.org/nginx/rev/cab37803ebb3
changeset: 7337:cab37803ebb3
user: Maxim Dounin <mdounin@mdounin.ru>
date: Fri Aug 10 20:49:06 2018 +0300
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.


src/event/ngx_event_openssl.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diffs (16 lines):

diff --git a/src/event/ngx_event_openssl.h b/src/event/ngx_event_openssl.h
--- a/src/event/ngx_event_openssl.h
+++ b/src/event/ngx_event_openssl.h
@@ -36,8 +36,12 @@

+#if (LIBRESSL_VERSION_NUMBER >= 0x2080000fL)
+#define OPENSSL_VERSION_NUMBER 0x1010000fL
#define OPENSSL_VERSION_NUMBER 0x1000107fL

#if (OPENSSL_VERSION_NUMBER >= 0x10100001L)
nginx-devel mailing list
Subject Author Views Posted

[nginx] SSL: fixed build with LibreSSL 2.8.0 (ticket #1605).

Maxim Dounin 205 August 10, 2018 02:54PM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 73
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready