nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

Module doesn't build with OpenSSL 1.1.0 (was: on Nginx 1.9.14)

Open HansVanEijsden opened this issue 10 years ago • 10 comments

Unfortunately, build failure with the newest Nginx 1.9.14. Maybe this can help you? Am I doing something wrong? It worked on 1.9.13. Thanks!

/usr/local/src/nginx-rtmp-module/ngx_rtmp_handshake.c: In function 'ngx_rtmp_make_digest': /usr/local/src/nginx-rtmp-module/ngx_rtmp_handshake.c:107:29: error: storage size of 'hmac' isn't known static HMAC_CTX hmac; ^ /usr/local/src/nginx-rtmp-module/ngx_rtmp_handshake.c:112:9: error: implicit declaration of function 'HMAC_CTX_init' [-Werror=implicit-function-declaration] HMAC_CTX_init(&hmac); ^ /usr/local/src/nginx-rtmp-module/ngx_rtmp_handshake.c:107:29: error: unused variable 'hmac' [-Werror=unused-variable] static HMAC_CTX hmac; ^ cc1: all warnings being treated as errors objs/Makefile:1841: recept voor doel 'objs/addon/nginx-rtmp-module/ngx_rtmp_handshake.o' is mislukt make[1]: *** [objs/addon/nginx-rtmp-module/ngx_rtmp_handshake.o] Fout 1 make[1]: Map '/usr/local/src/nginx-1.9.14' wordt verlaten Makefile:11: recept voor doel 'install' is mislukt make: *** [install] Fout 2

Linux vps 4.4.0-0.bpo.1-amd64 #1 SMP Debian 4.4.6-1~bpo8+1 (2016-03-20) x86_64 GNU/Linux gcc version 4.9.2 (Debian 4.9.2-10)

./configure --prefix=/opt/nginx19 --user=www-data --group=www-data --add-module=/usr/local/src/ngx_brotli_module --with-http_ssl_module --with-http_v2_module --with-openssl=/usr/local/src/openssl-1.1.0-pre4 --with-openssl-opt="enable-ec_nistp_64_gcc_128 threads" --with-md5=/usr/local/src/openssl-1.1.0-pre4 --with-md5-asm --with-sha1=/usr/local/src/openssl-1.1.0-pre4 --with-sha1-asm --with-pcre-jit --with-file-aio --with-http_flv_module --with-http_geoip_module --with-http_mp4_module --with-http_realip_module --with-http_stub_status_module --with-threads --with-ipv6 --add-module=/usr/local/src/headers-more-nginx-module --add-module=/usr/local/src/echo-nginx-module --add-module=/usr/local/src/ngx_http_substitutions_filter_module --add-module=/usr/local/src/srcache-nginx-module --add-module=/usr/local/src/redis2-nginx-module --add-module=/usr/local/src/ngx_http_redis-0.3.8 --add-module=/usr/local/src/ngx_devel_kit --add-module=/usr/local/src/set-misc-nginx-module --add-module=/usr/local/src/nginx-rtmp-module --with-cc-opt="-DTCP_FASTOPEN=23 -O3 -march=native"

HansVanEijsden avatar Apr 05 '16 16:04 HansVanEijsden

Update, I also changed the subject. Looks like it doesn't work with the combination of Nginx 1.9.14 and OpenSSL 1.1.0-pre-4. I downgraded to OpenSSL 1.0.2g and everything works again.

HansVanEijsden avatar Apr 06 '16 18:04 HansVanEijsden

OpenSSL 1.0.2g with nginx 1.9.14 works?

Edit: I cannot check, because I have very specific configurations on all servers to protect compiling :)

misiek08 avatar Apr 07 '16 20:04 misiek08

Yes, OpenSSL 1.0.2g with Nginx 1.9.14 works 😃

HansVanEijsden avatar Apr 07 '16 20:04 HansVanEijsden

i am new to here,and with 1.0.2g with Nginx 1.9.14,i also success!

shutup avatar Apr 10 '16 12:04 shutup

OpenSSL 1.1.0a with nginx/1.11.4 broken.

It appears that there are some hmac deprecated usage in current nginx-rtmp module when it comes to trying to build with OpenSSL 1.1.0*

lawyerj avatar Sep 25 '16 22:09 lawyerj

1.0.2g is too old, three new packages were introduced 4 days ago...

I have successfully compiled with: OpenSSL_1_0_2i HTTP2 and ALPN work too!

Download the OpenSSL source code and placed it in my; /root/openssl-1.0.2i/ folder

./auto/configure --sbin-path=/usr/sbin/nginx --prefix=/etc/nginx --with-openssl=/root/openssl-1.0.2i --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-threads --with-stream --with-stream_ssl_module --with-stream_realip_module --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-z,relro -Wl,--as-needed'

knoxcard avatar Sep 25 '16 23:09 knoxcard

What's the resolution for OpenSSl 1.1.0 and NGINX 1.11.4 ?

willtorres avatar Oct 05 '16 20:10 willtorres

it does not work with openssl 1.1.0b and NGINX 1.10

seawolf1012 avatar Oct 27 '16 16:10 seawolf1012

@arut Any chance of merging superp00t's fix as referenced here in the comments?

ghost avatar Jul 17 '17 14:07 ghost

The issue has already been fixed, see https://github.com/arut/nginx-rtmp-module/commit/04f0ab97ac61d181dbfdaa5299412fc3064e95a3

arut avatar Jul 18 '17 07:07 arut