Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1429 closed defect (wontfix)

Cannot compile nginx 1.13.6 with http_v2_module

Reported by: https://stackoverflow.com/users/973237/vincent Owned by:
Priority: blocker Milestone:
Component: other Version: 1.13.x
Keywords: compile http_v2_module Cc:
uname -a: Linux 3.10.23-xxxx-std-ipv6-64 #1 SMP Tue Mar 18 14:48:24 CET 2014 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.9.9
built by gcc 4.7.2 (Debian 4.7.2-5)
built with OpenSSL 1.0.1e 11 Feb 2013 (running with OpenSSL 1.0.1t 3 May 2016)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --with-http_ssl_module --add-module=/root/ngx_pagespeed-release-1.9.32.2-beta --with-http_stub_status_module

Description

I'm trying to compile nginx-1.13.6 with http/2 module

OpenSSL version is :
OpenSSL 1.1.0f 25 May 2017 (Library: OpenSSL 1.1.0-pre6-dev xx XXX xxxx)

Configure command is :

./configure 
--prefix=/etc/nginx
--with-http_v2_module 
--with-http_ssl_module 
--with-http_stub_status_module


"make" generates the error:

rc/event/ngx_event_openssl.c: In function ‘ngx_ssl_get_client_v_start’:
src/event/ngx_event_openssl.c:4022:26: error: implicit declaration of function ‘X509_get0_notBefore’ [-Werror=implicit-function-declaration]

ASN1_TIME_print(bio, X509_get0_notBefore(cert));


src/event/ngx_event_openssl.c:4022:26: error: passing argument 2 of ‘ASN1_TIME_print’ makes pointer from integer without a cast [-Werror=int-conversion]
In file included from /usr/local/include/openssl/objects.h:916:0,

from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from src/event/ngx_event_openssl.h:15,
from src/core/ngx_core.h:82,
from src/event/ngx_event_openssl.c:9:

/usr/local/include/openssl/asn1.h:744:5: note: expected ‘const ASN1_TIME * {aka const struct asn1_string_st *}’ but argument is of type ‘int’

int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);


src/event/ngx_event_openssl.c: In function ‘ngx_ssl_get_client_v_end’:
src/event/ngx_event_openssl.c:4066:26: error: implicit declaration of function ‘X509_get0_notAfter’ [-Werror=implicit-function-declaration]

ASN1_TIME_print(bio, X509_get0_notAfter(cert));

~

src/event/ngx_event_openssl.c:4066:26: error: passing argument 2 of ‘ASN1_TIME_print’ makes pointer from integer without a cast [-Werror=int-conversion]
In file included from /usr/local/include/openssl/objects.h:916:0,

from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from src/event/ngx_event_openssl.h:15,
from src/core/ngx_core.h:82,
from src/event/ngx_event_openssl.c:9:

/usr/local/include/openssl/asn1.h:744:5: note: expected ‘const ASN1_TIME * {aka const struct asn1_string_st *}’ but argument is of type ‘int’

int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);


src/event/ngx_event_openssl.c: In function ‘ngx_ssl_get_client_v_remain’:
src/event/ngx_event_openssl.c:4103:30: error: passing argument 1 of ‘ngx_ssl_parse_time’ makes pointer from integer without a cast [-Werror=int-conversion]

end = ngx_ssl_parse_time(X509_get0_notAfter(cert));

~

src/event/ngx_event_openssl.c:63:15: note: expected ‘const ASN1_TIME * {aka const struct asn1_string_st *}’ but argument is of type ‘int’

static time_t ngx_ssl_parse_time(

Change History (3)

comment:1 by Sergey Kandaurov, 7 years ago

Resolution: wontfix
Status: newclosed

It's not clear what OpenSSL version is used.
Using old unreleased OpenSSL versions such as OpenSSL 1.1.0-pre6-dev is not something supported.

comment:2 by https://stackoverflow.com/users/973237/vincent, 7 years ago

OpenSSL version is 1.1.0f

in reply to:  2 comment:3 by Maxim Dounin, 7 years ago

Replying to https://stackoverflow.com/users/973237/vincent:

OpenSSL version is 1.1.0f

It isn't, check your setup. The X509_get0_notBefore() function was introduced in the 568ce3a583a commit, and it is available in all OpenSSL releases starting with 1.1.0, including OpenSSL 1.1.0f. The version you are using is certainly different, and likely the one you've specified in the initial ticket description:

OpenSSL version is :
OpenSSL 1.1.0f 25 May 2017 (Library: OpenSSL 1.1.0-pre6-dev xx XXX xxxx)

Note that the library version is OpenSSL 1.1.0-pre6-dev xx XXX xxxx. The 1.1.0f is the version of the openssl command itself, but not the library.

Note: See TracTickets for help on using tickets.