#1605 closed defect (fixed)
nginx does not compile with LibreSSL 2.8.0
Reported by: | Leon Klingele | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | other | Version: | 1.15.x |
Keywords: | openssl, libressl, ssl, tls | Cc: | - |
uname -a: | - | ||
nginx -V: | - |
Description
LibreSSL (2.8.0) doesn't compile with nginx 1.15.2 (static build). Compilation worked fine with 2.7.4.
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/packaging/nginx/upstream=. -fstack-protector-strong -Wformat -Werror=format-security -I src/core -I src/event -I src/event/modules -I src/os/unix -I submodules/pcre -I submodules/libressl/.openssl/include -I objs \ -o objs/src/event/ngx_event_openssl.o \ src/event/ngx_event_openssl.c src/event/ngx_event_openssl.c: In function ‘ngx_ssl_session_cache’: src/event/ngx_event_openssl.c:2340:43: error: passing argument 2 of ‘SSL_CTX_sess_set_get_cb’ from incompatible pointer type [-Werror=incompatible-pointer-types] SSL_CTX_sess_set_get_cb(ssl->ctx, ngx_ssl_get_cached_session); ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/event/ngx_event_openssl.h:15:0, from src/core/ngx_core.h:83, from src/event/ngx_event_openssl.c:9: submodules/libressl/.openssl/include/openssl/ssl.h:729:6: note: expected ‘SSL_SESSION * (*)(struct ssl_st *, const unsigned char *, int, int *) {aka struct ssl_session_st * (*)(struct ssl_st *, const unsigned char *, int, int *)}’ but argument is of type ‘SSL_SESSION * (*)(SSL *, u_char *, int, int *) {aka struct ssl_session_st * (*)(struct ssl_st *, unsigned char *, int, int *)}’ void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, ^~~~~~~~~~~~~~~~~~~~~~~
See https://github.com/libressl-portable/portable/issues/435#issuecomment-410455246 for an explanation of the issue.
Bug report on the LibreSSL repo: https://github.com/libressl-portable/portable/issues/435
Note:
See TracTickets
for help on using tickets.
Thank you for reporting this. Please try the following patch: