Nginx fork modified to store some TLS handshake data. Intended for use in conjunction with the ja4-nginx-module: https://github.com/FoxIO-LLC/ja4-nginx-module
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4’:
./module/ngx_http_ssl_ja4_module.c:305:18: error: implicit declaration of function ‘ngx_ssl_ja4_is_ext_greased’ [-Werror=implicit-function-declaration]
305 | if (!ngx_ssl_ja4_is_ext_greased(us))
| ^~~~~~
./module/ngx_http_ssl_ja4_module.c:311:70: error: ‘compare_ciphers’ undeclared (first use in this function)
311 | qsort(ja4->ciphers, ja4->ciphers_sz, sizeof(unsigned short), compare_ciphers);
| ^~~~~~~
./module/ngx_http_ssl_ja4_module.c:311:70: note: each undeclared identifier is reported only once for each function it appears in
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4_fp’:
./module/ngx_http_ssl_ja4_module.c:459:5: error: implicit declaration of function ‘ngx_ssl_ja4_detail_print’ [-Werror=implicit-function-declaration]
459 | ngx_ssl_ja4_detail_print(pool, ja4);
| ^~~~~~~~
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4s’:
./module/ngx_http_ssl_ja4_module.c:646:20: error: unused variable ‘us’ [-Werror=unused-variable]
646 | unsigned short us = 0;
| ^~
./module/ngx_http_ssl_ja4_module.c:645:12: error: unused variable ‘len’ [-Werror=unused-variable]
645 | size_t len = 0;
| ^~~
./module/ngx_http_ssl_ja4_module.c:644:12: error: unused variable ‘i’ [-Werror=unused-variable]
644 | size_t i;
| ^
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4s_fp_string’:
./module/ngx_http_ssl_ja4_module.c:735:23: error: ‘ngx_ssl_ja4s_t’ {aka ‘struct ngx_ssl_ja4s_s’} has no member named ‘ciphers_sz’
735 | + ja4->ciphers_sz 6 // ciphers and commas
| ^~
./module/ngx_http_ssl_ja4_module.c:747:12: error: unused variable ‘cur’ [-Werror=unused-variable]
747 | size_t cur = 0;
| ^~~
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4h’:
./module/ngx_http_ssl_ja4_module.c:757:20: error: unused variable ‘us’ [-Werror=unused-variable]
757 | unsigned short us = 0;
| ^~
./module/ngx_http_ssl_ja4_module.c:756:12: error: unused variable ‘len’ [-Werror=unused-variable]
756 | size_t len = 0;
| ^~~
./module/ngx_http_ssl_ja4_module.c:755:12: error: unused variable ‘i’ [-Werror=unused-variable]
755 | size_t i;
| ^
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4t’:
./module/ngx_http_ssl_ja4_module.c:842:20: error: unused variable ‘us’ [-Werror=unused-variable]
842 | unsigned short us = 0;
| ^~
./module/ngx_http_ssl_ja4_module.c:841:12: error: unused variable ‘len’ [-Werror=unused-variable]
841 | size_t len = 0;
| ^~~
./module/ngx_http_ssl_ja4_module.c:840:12: error: unused variable ‘i’ [-Werror=unused-variable]
840 | size_t i;
| ^
./module/ngx_http_ssl_ja4_module.c: At top level:
./module/ngx_http_ssl_ja4_module.c:921:5: error: redefinition of ‘ngx_ssl_ja4t’
921 | int ngx_ssl_ja4t(ngx_connection_t c, ngx_pool_t pool, ngx_ssl_ja4t_t ja4t)
| ^~~~
./module/ngx_http_ssl_ja4_module.c:836:5: note: previous definition of ‘ngx_ssl_ja4t’ was here
836 | int ngx_ssl_ja4t(ngx_connection_t c, ngx_pool_t pool, ngx_ssl_ja4t_t ja4t)
| ^~~~
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4t’:
./module/ngx_http_ssl_ja4_module.c:927:20: error: unused variable ‘us’ [-Werror=unused-variable]
927 | unsigned short us = 0;
| ^~
./module/ngx_http_ssl_ja4_module.c:926:12: error: unused variable ‘len’ [-Werror=unused-variable]
926 | size_t len = 0;
| ^~~
./module/ngx_http_ssl_ja4_module.c:925:12: error: unused variable ‘i’ [-Werror=unused-variable]
925 | size_t i;
| ^
./module/ngx_http_ssl_ja4_module.c: At top level:
./module/ngx_http_ssl_ja4_module.c:947:1: error: redefinition of ‘ngx_http_ssl_ja4t’
947 | ngx_http_ssl_ja4t(ngx_http_request_t r,
| ^~~~~
./module/ngx_http_ssl_ja4_module.c:862:1: note: previous definition of ‘ngx_http_ssl_ja4t’ was here
862 | ngx_http_ssl_ja4t(ngx_http_request_t r,
| ^~~~~
./module/ngx_http_ssl_ja4_module.c:973:6: error: redefinition of ‘ngx_ssl_ja4t_fp’
973 | void ngx_ssl_ja4t_fp(ngx_pool_t pool, ngx_ssl_ja4t_t ja4t, ngx_str_t out) {}
| ^~~~~~~
./module/ngx_http_ssl_ja4_module.c:888:6: note: previous definition of ‘ngx_ssl_ja4t_fp’ was here
888 | void ngx_ssl_ja4t_fp(ngx_pool_t pool, ngx_ssl_ja4t_t ja4t, ngx_str_t out) {}
| ^~~~~~~
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_http_ssl_ja4ts_string’:
./module/ngx_http_ssl_ja4_module.c:993:5: error: implicit declaration of function ‘ngx_ssl_ja4ts_fp_string’; did you mean ‘ngx_ssl_ja4t_fp_string’? [-Werror=implicit-function-declaration]
993 | ngx_ssl_ja4ts_fp_string(r->pool, &ja4ts, &fp);
| ^~~~~~~
| ngx_ssl_ja4t_fp_string
./module/ngx_http_ssl_ja4_module.c: At top level:
./module/ngx_http_ssl_ja4_module.c:1003:6: error: conflicting types for ‘ngx_ssl_ja4ts_fp_string’ [-Werror]
1003 | void ngx_ssl_ja4ts_fp_string(ngx_pool_t pool, ngx_ssl_ja4ts_t ja4ts, ngx_str_t out) {}
| ^~~~~~~
./module/ngx_http_ssl_ja4_module.c:993:5: note: previous implicit declaration of ‘ngx_ssl_ja4ts_fp_string’ was here
993 | ngx_ssl_ja4ts_fp_string(r->pool, &ja4ts, &fp);
| ^~~~~~~
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4l_fp’:
./module/ngx_http_ssl_ja4_module.c:1118:5: error: implicit declaration of function ‘ngx_ssl_ja4l_detail_print’ [-Werror=implicit-function-declaration]
1118 | ngx_ssl_ja4l_detail_print(pool, ja4l);
| ^~~~~~~~~
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_http_ssl_ja4_init’:
./module/ngx_http_ssl_ja4_module.c:1171:24: error: ‘ngx_http_ssl_ja4_variables_list’ undeclared (first use in this function); did you mean ‘ngx_http_script_variables_count’?
1171 | vars_len = (sizeof(ngx_http_ssl_ja4_variables_list) /
| ^~~~~~~
| ngx_http_script_variables_count
./module/ngx_http_ssl_ja4_module.c: At top level:
./module/ngx_http_ssl_ja4_module.c:1295:1: error: static declaration of ‘ngx_ssl_ja4_is_ext_greased’ follows non-static declaration
1295 | ngx_ssl_ja4_is_ext_greased(int id)
| ^~~~~~
./module/ngx_http_ssl_ja4_module.c:305:18: note: previous implicit declaration of ‘ngx_ssl_ja4_is_ext_greased’ was here
305 | if (!ngx_ssl_ja4_is_ext_greased(us))
| ^~~~~~
./module/ngx_http_ssl_ja4_module.c:1310:1: error: conflicting types for ‘ngx_ssl_ja4l_detail_print’ [-Werror]
1310 | ngx_ssl_ja4l_detail_print(ngx_pool_t pool, ngx_ssl_ja4l_t ja4l)
| ^~~~~~~~~
./module/ngx_http_ssl_ja4_module.c:1310:1: error: static declaration of ‘ngx_ssl_ja4l_detail_print’ follows non-static declaration
./module/ngx_http_ssl_ja4_module.c:1118:5: note: previous implicit declaration of ‘ngx_ssl_ja4l_detail_print’ was here
1118 | ngx_ssl_ja4l_detail_print(pool, ja4l);
| ^~~~~~~~~
./module/ngx_http_ssl_ja4_module.c:1335:1: error: conflicting types for ‘ngx_ssl_ja4_detail_print’ [-Werror]
1335 | ngx_ssl_ja4_detail_print(ngx_pool_t pool, ngx_ssl_ja4_t ja4)
| ^~~~~~~~
./module/ngx_http_ssl_ja4_module.c:1335:1: error: static declaration of ‘ngx_ssl_ja4_detail_print’ follows non-static declaration
./module/ngx_http_ssl_ja4_module.c:459:5: note: previous implicit declaration of ‘ngx_ssl_ja4_detail_print’ was here
459 | ngx_ssl_ja4_detail_print(pool, ja4);
| ^~~~~~~~
./module/ngx_http_ssl_ja4_module.c:168:18: error: ‘ngx_http_ssl_ja4ts’ used but never defined [-Werror]
168 | static ngx_int_t ngx_http_ssl_ja4ts(ngx_http_request_t r, ngx_http_variable_value_t v, uintptr_t data);
| ^~~~~~
./module/ngx_http_ssl_ja4_module.c:173:18: error: ‘ngx_http_ssl_ja4x’ declared ‘static’ but never defined [-Werror=unused-function]
173 | static ngx_int_t ngx_http_ssl_ja4x(ngx_http_request_t r, ngx_http_variable_value_t v, uintptr_t data);
| ^~~~~
./module/ngx_http_ssl_ja4_module.c:1406:12: error: ‘compare_ciphers’ defined but not used [-Werror=unused-function]
1406 | static int compare_ciphers(const void a, const void b)
| ^~~~~~~
./module/ngx_http_ssl_ja4_module.c:1335:1: error: ‘ngx_ssl_ja4_detail_print’ defined but not used [-Werror=unused-function]
1335 | ngx_ssl_ja4_detail_print(ngx_pool_t pool, ngx_ssl_ja4_t ja4)
| ^~~~~~~~
./module/ngx_http_ssl_ja4_module.c:1310:1: error: ‘ngx_ssl_ja4l_detail_print’ defined but not used [-Werror=unused-function]
1310 | ngx_ssl_ja4l_detail_print(ngx_pool_t pool, ngx_ssl_ja4l_t ja4l)
| ^~~~~~~~~
./module/ngx_http_ssl_ja4_module.c:1295:1: error: ‘ngx_ssl_ja4_is_ext_greased’ defined but not used [-Werror=unused-function]
1295 | ngx_ssl_ja4_is_ext_greased(int id)
| ^~~~~~
./module/ngx_http_ssl_ja4_module.c:1224:28: error: ‘ngx_http_ssl_ja4_variables_list’ defined but not used [-Werror=unused-variable]
1224 | static ngx_http_variable_t ngx_http_ssl_ja4_variables_list[] = {
| ^~~~~~~
./module/ngx_http_ssl_ja4_module.c:862:1: error: ‘ngx_http_ssl_ja4t’ defined but not used [-Werror=unused-function]
862 | ngx_http_ssl_ja4t(ngx_http_request_t *r,
./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4’: ./module/ngx_http_ssl_ja4_module.c:305:18: error: implicit declaration of function ‘ngx_ssl_ja4_is_ext_greased’ [-Werror=implicit-function-declaration] 305 | if (!ngx_ssl_ja4_is_ext_greased(us)) | ^
~~~~~./module/ngx_http_ssl_ja4_module.c:311:70: error: ‘compare_ciphers’ undeclared (first use in this function) 311 | qsort(ja4->ciphers, ja4->ciphers_sz, sizeof(unsigned short), compare_ciphers); | ^~~~~~~ ./module/ngx_http_ssl_ja4_module.c:311:70: note: each undeclared identifier is reported only once for each function it appears in ./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4_fp’: ./module/ngx_http_ssl_ja4_module.c:459:5: error: implicit declaration of function ‘ngx_ssl_ja4_detail_print’ [-Werror=implicit-function-declaration] 459 | ngx_ssl_ja4_detail_print(pool, ja4); | ^~~~~~~~ ./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4s’: ./module/ngx_http_ssl_ja4_module.c:646:20: error: unused variable ‘us’ [-Werror=unused-variable] 646 | unsigned short us = 0; | ^~ ./module/ngx_http_ssl_ja4_module.c:645:12: error: unused variable ‘len’ [-Werror=unused-variable] 645 | size_t len = 0; | ^~~ ./module/ngx_http_ssl_ja4_module.c:644:12: error: unused variable ‘i’ [-Werror=unused-variable] 644 | size_t i; | ^ ./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4s_fp_string’: ./module/ngx_http_ssl_ja4_module.c:735:23: error: ‘ngx_ssl_ja4s_t’ {aka ‘struct ngx_ssl_ja4s_s’} has no member named ‘ciphers_sz’ 735 | + ja4->ciphers_sz 6 // ciphers and commas | ^~ ./module/ngx_http_ssl_ja4_module.c:747:12: error: unused variable ‘cur’ [-Werror=unused-variable] 747 | size_t cur = 0; | ^~~ ./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4h’: ./module/ngx_http_ssl_ja4_module.c:757:20: error: unused variable ‘us’ [-Werror=unused-variable] 757 | unsigned short us = 0; | ^~ ./module/ngx_http_ssl_ja4_module.c:756:12: error: unused variable ‘len’ [-Werror=unused-variable] 756 | size_t len = 0; | ^~~ ./module/ngx_http_ssl_ja4_module.c:755:12: error: unused variable ‘i’ [-Werror=unused-variable] 755 | size_t i; | ^ ./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4t’: ./module/ngx_http_ssl_ja4_module.c:842:20: error: unused variable ‘us’ [-Werror=unused-variable] 842 | unsigned short us = 0; | ^~ ./module/ngx_http_ssl_ja4_module.c:841:12: error: unused variable ‘len’ [-Werror=unused-variable] 841 | size_t len = 0; | ^~~ ./module/ngx_http_ssl_ja4_module.c:840:12: error: unused variable ‘i’ [-Werror=unused-variable] 840 | size_t i; | ^ ./module/ngx_http_ssl_ja4_module.c: At top level: ./module/ngx_http_ssl_ja4_module.c:921:5: error: redefinition of ‘ngx_ssl_ja4t’ 921 | int ngx_ssl_ja4t(ngx_connection_t c, ngx_pool_t pool, ngx_ssl_ja4t_t ja4t) | ^~~~ ./module/ngx_http_ssl_ja4_module.c:836:5: note: previous definition of ‘ngx_ssl_ja4t’ was here 836 | int ngx_ssl_ja4t(ngx_connection_t c, ngx_pool_t pool, ngx_ssl_ja4t_t ja4t) | ^~~~ ./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4t’: ./module/ngx_http_ssl_ja4_module.c:927:20: error: unused variable ‘us’ [-Werror=unused-variable] 927 | unsigned short us = 0; | ^~ ./module/ngx_http_ssl_ja4_module.c:926:12: error: unused variable ‘len’ [-Werror=unused-variable] 926 | size_t len = 0; | ^~~ ./module/ngx_http_ssl_ja4_module.c:925:12: error: unused variable ‘i’ [-Werror=unused-variable] 925 | size_t i; | ^ ./module/ngx_http_ssl_ja4_module.c: At top level: ./module/ngx_http_ssl_ja4_module.c:947:1: error: redefinition of ‘ngx_http_ssl_ja4t’ 947 | ngx_http_ssl_ja4t(ngx_http_request_t r, | ^~~~~ ./module/ngx_http_ssl_ja4_module.c:862:1: note: previous definition of ‘ngx_http_ssl_ja4t’ was here 862 | ngx_http_ssl_ja4t(ngx_http_request_t r, | ^~~~~ ./module/ngx_http_ssl_ja4_module.c:973:6: error: redefinition of ‘ngx_ssl_ja4t_fp’ 973 | void ngx_ssl_ja4t_fp(ngx_pool_t pool, ngx_ssl_ja4t_t ja4t, ngx_str_t out) {} | ^~~~~~~ ./module/ngx_http_ssl_ja4_module.c:888:6: note: previous definition of ‘ngx_ssl_ja4t_fp’ was here 888 | void ngx_ssl_ja4t_fp(ngx_pool_t pool, ngx_ssl_ja4t_t ja4t, ngx_str_t out) {} | ^~~~~~~ ./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_http_ssl_ja4ts_string’: ./module/ngx_http_ssl_ja4_module.c:993:5: error: implicit declaration of function ‘ngx_ssl_ja4ts_fp_string’; did you mean ‘ngx_ssl_ja4t_fp_string’? [-Werror=implicit-function-declaration] 993 | ngx_ssl_ja4ts_fp_string(r->pool, &ja4ts, &fp); | ^~~~~~~ | ngx_ssl_ja4t_fp_string ./module/ngx_http_ssl_ja4_module.c: At top level: ./module/ngx_http_ssl_ja4_module.c:1003:6: error: conflicting types for ‘ngx_ssl_ja4ts_fp_string’ [-Werror] 1003 | void ngx_ssl_ja4ts_fp_string(ngx_pool_t pool, ngx_ssl_ja4ts_t ja4ts, ngx_str_t out) {} | ^~~~~~~ ./module/ngx_http_ssl_ja4_module.c:993:5: note: previous implicit declaration of ‘ngx_ssl_ja4ts_fp_string’ was here 993 | ngx_ssl_ja4ts_fp_string(r->pool, &ja4ts, &fp); | ^~~~~~~ ./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_ssl_ja4l_fp’: ./module/ngx_http_ssl_ja4_module.c:1118:5: error: implicit declaration of function ‘ngx_ssl_ja4l_detail_print’ [-Werror=implicit-function-declaration] 1118 | ngx_ssl_ja4l_detail_print(pool, ja4l); | ^~~~~~~~~ ./module/ngx_http_ssl_ja4_module.c: In function ‘ngx_http_ssl_ja4_init’: ./module/ngx_http_ssl_ja4_module.c:1171:24: error: ‘ngx_http_ssl_ja4_variables_list’ undeclared (first use in this function); did you mean ‘ngx_http_script_variables_count’? 1171 | vars_len = (sizeof(ngx_http_ssl_ja4_variables_list) / | ^~~~~~~| ngx_http_script_variables_count ./module/ngx_http_ssl_ja4_module.c: At top level: ./module/ngx_http_ssl_ja4_module.c:1295:1: error: static declaration of ‘ngx_ssl_ja4_is_ext_greased’ follows non-static declaration 1295 | ngx_ssl_ja4_is_ext_greased(int id) | ^~~~~~./module/ngx_http_ssl_ja4_module.c:305:18: note: previous implicit declaration of ‘ngx_ssl_ja4_is_ext_greased’ was here 305 | if (!ngx_ssl_ja4_is_ext_greased(us)) | ^~~~~~./module/ngx_http_ssl_ja4_module.c:1310:1: error: conflicting types for ‘ngx_ssl_ja4l_detail_print’ [-Werror] 1310 | ngx_ssl_ja4l_detail_print(ngx_pool_t pool, ngx_ssl_ja4l_t ja4l) | ^~~~~~~~~ ./module/ngx_http_ssl_ja4_module.c:1310:1: error: static declaration of ‘ngx_ssl_ja4l_detail_print’ follows non-static declaration ./module/ngx_http_ssl_ja4_module.c:1118:5: note: previous implicit declaration of ‘ngx_ssl_ja4l_detail_print’ was here 1118 | ngx_ssl_ja4l_detail_print(pool, ja4l); | ^~~~~~~~~ ./module/ngx_http_ssl_ja4_module.c:1335:1: error: conflicting types for ‘ngx_ssl_ja4_detail_print’ [-Werror] 1335 | ngx_ssl_ja4_detail_print(ngx_pool_t pool, ngx_ssl_ja4_t ja4) | ^~~~~~~~ ./module/ngx_http_ssl_ja4_module.c:1335:1: error: static declaration of ‘ngx_ssl_ja4_detail_print’ follows non-static declaration ./module/ngx_http_ssl_ja4_module.c:459:5: note: previous implicit declaration of ‘ngx_ssl_ja4_detail_print’ was here 459 | ngx_ssl_ja4_detail_print(pool, ja4); | ^~~~~~~~ ./module/ngx_http_ssl_ja4_module.c:168:18: error: ‘ngx_http_ssl_ja4ts’ used but never defined [-Werror] 168 | static ngx_int_t ngx_http_ssl_ja4ts(ngx_http_request_t r, ngx_http_variable_value_t v, uintptr_t data); | ^~~~~~ ./module/ngx_http_ssl_ja4_module.c:173:18: error: ‘ngx_http_ssl_ja4x’ declared ‘static’ but never defined [-Werror=unused-function] 173 | static ngx_int_t ngx_http_ssl_ja4x(ngx_http_request_t r, ngx_http_variable_value_t v, uintptr_t data); | ^~~~~ ./module/ngx_http_ssl_ja4_module.c:1406:12: error: ‘compare_ciphers’ defined but not used [-Werror=unused-function] 1406 | static int compare_ciphers(const void a, const void b) | ^~~~~~~ ./module/ngx_http_ssl_ja4_module.c:1335:1: error: ‘ngx_ssl_ja4_detail_print’ defined but not used [-Werror=unused-function] 1335 | ngx_ssl_ja4_detail_print(ngx_pool_t pool, ngx_ssl_ja4_t ja4) | ^~~~~~~~ ./module/ngx_http_ssl_ja4_module.c:1310:1: error: ‘ngx_ssl_ja4l_detail_print’ defined but not used [-Werror=unused-function] 1310 | ngx_ssl_ja4l_detail_print(ngx_pool_t pool, ngx_ssl_ja4l_t ja4l) | ^~~~~~~~~ ./module/ngx_http_ssl_ja4_module.c:1295:1: error: ‘ngx_ssl_ja4_is_ext_greased’ defined but not used [-Werror=unused-function] 1295 | ngx_ssl_ja4_is_ext_greased(int id) | ^~~~~~./module/ngx_http_ssl_ja4_module.c:1224:28: error: ‘ngx_http_ssl_ja4_variables_list’ defined but not used [-Werror=unused-variable] 1224 | static ngx_http_variable_t ngx_http_ssl_ja4_variables_list[] = { | ^~~~~~~./module/ngx_http_ssl_ja4_module.c:862:1: error: ‘ngx_http_ssl_ja4t’ defined but not used [-Werror=unused-function] 862 | ngx_http_ssl_ja4t(ngx_http_request_t *r,would you please guide how fix these error.