Skip to content

Commit cc8b067

Browse files
feature: add support for nginx-1.29.2.
1 parent 94c578a commit cc8b067

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

.travis.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ env:
4646
- LUAJIT_LIB=$LUAJIT_PREFIX/lib
4747
- LUAJIT_INC=$LUAJIT_PREFIX/include/luajit-2.1
4848
- LUA_INCLUDE_DIR=$LUAJIT_INC
49-
- PCRE2_PREFIX=/usr/local/openresty/pcre2
49+
#- PCRE2_PREFIX=/usr/local/openresty/pcre2
50+
- PCRE2_PREFIX=/opt/pcre2
5051
- PCRE2_LIB=$PCRE2_PREFIX/lib
5152
- PCRE2_INC=$PCRE2_PREFIX/include
52-
- OPENSSL_PREFIX=/usr/local/openresty/openssl3
53+
#- OPENSSL_PREFIX=/usr/local/openresty/openssl3
54+
- OPENSSL_PREFIX=/opt/openssl3
5355
- OPENSSL_LIB=$OPENSSL_PREFIX/lib
5456
- OPENSSL_INC=$OPENSSL_PREFIX/include
5557
- LIBDRIZZLE_PREFIX=/opt/drizzle
@@ -60,10 +62,10 @@ env:
6062
- TEST_NGINX_SLEEP=0.006
6163
- MALLOC_PERTURB_=9
6264
jobs:
63-
- NGINX_VERSION=1.27.1 OPENSSL_VER=3.5.0 OPENSSL_PATCH_VER=3.5.0 TEST_NGINX_TIMEOUT=5 PCRE2_VER=10.45
64-
- NGINX_VERSION=1.27.1 OPENSSL_VER=3.5.0 OPENSSL_PATCH_VER=3.5.0 TEST_NGINX_TIMEOUT=5 PCRE2_VER=10.45 TEST_NGINX_USE_HTTP2=1
65-
- NGINX_VERSION=1.27.1 OPENSSL_VER=3.5.0 OPENSSL_PATCH_VER=3.5.0 TEST_NGINX_USE_HTTP3=1 TEST_NGINX_QUIC_IDLE_TIMEOUT=3 PCRE2_VER=10.45
66-
- NGINX_VERSION=1.27.1 BORINGSSL=1 TEST_NGINX_USE_HTTP3=1 TEST_NGINX_QUIC_IDLE_TIMEOUT=3 PCRE2_VER=10.45
65+
- NGINX_VERSION=1.29.2 OPENSSL_VER=3.5.4 OPENSSL_PATCH_VER=3.5.4 TEST_NGINX_TIMEOUT=5 PCRE2_VER=10.46
66+
- NGINX_VERSION=1.29.2 OPENSSL_VER=3.5.4 OPENSSL_PATCH_VER=3.5.4 TEST_NGINX_TIMEOUT=5 PCRE2_VER=10.46 TEST_NGINX_USE_HTTP2=1
67+
- NGINX_VERSION=1.29.2 OPENSSL_VER=3.5.4 OPENSSL_PATCH_VER=3.5.4 TEST_NGINX_USE_HTTP3=1 TEST_NGINX_QUIC_IDLE_TIMEOUT=3 PCRE2_VER=10.46
68+
- NGINX_VERSION=1.29.2 BORINGSSL=1 TEST_NGINX_USE_HTTP3=1 TEST_NGINX_QUIC_IDLE_TIMEOUT=3 PCRE2_VER=10.46
6769

6870
services:
6971
- memcached
@@ -82,8 +84,8 @@ before_install:
8284

8385
install:
8486
- if [ ! -f download-cache/drizzle7-$DRIZZLE_VER.tar.gz ]; then wget -P download-cache https://github.com/openresty/openresty-deps-prebuild/releases/download/v20230902/drizzle7-$DRIZZLE_VER.tar.gz; fi
85-
#- if [ -n "$PCRE2_VER" ] && [ ! -f download-cache/pcre2-$PCRE2_VER.tar.gz ]; then wget -P download-cache https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${PCRE2_VER}/pcre2-${PCRE2_VER}.tar.gz; fi
86-
#- if [ -n "$OPENSSL_VER" ] && [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VER/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi
87+
- if [ -n "$PCRE2_VER" ] && [ ! -f download-cache/pcre2-$PCRE2_VER.tar.gz ]; then wget -P download-cache https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${PCRE2_VER}/pcre2-${PCRE2_VER}.tar.gz; fi
88+
- if [ -n "$OPENSSL_VER" ] && [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VER/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi
8789
- wget https://github.com/openresty/openresty-deps-prebuild/releases/download/v20230902/boringssl-20230902-x64-focal.tar.gz
8890
- wget https://github.com/openresty/openresty-deps-prebuild/releases/download/v20230902/curl-h3-x64-focal.tar.gz
8991
- git clone https://github.com/openresty/test-nginx.git
@@ -135,8 +137,8 @@ script:
135137
- sudo make install-libdrizzle-1.0 > build.log 2>&1 || (cat build.log && exit 1)
136138
- cd ../mockeagain/ && make CC=$CC -j$JOBS && cd ..
137139
- cd lua-cjson/ && make -j$JOBS && sudo make install && cd ..
138-
#- if [ -n "$PCRE2_VER" ]; then tar zxf download-cache/pcre2-$PCRE2_VER.tar.gz; cd pcre2-$PCRE2_VER/; ./configure --prefix=$PCRE2_PREFIX --enable-jit --enable-utf > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi
139-
#- if [ -n "$OPENSSL_VER" ]; then tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz; cd openssl-$OPENSSL_VER/; patch -p1 < ../../openresty/patches/openssl-$OPENSSL_PATCH_VER-sess_set_get_cb_yield.patch; ./config shared enable-ssl3 enable-ssl3-method -g --prefix=$OPENSSL_PREFIX --libdir=lib -DPURIFY > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo make PATH=$PATH install_sw > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi
140+
- if [ -n "$PCRE2_VER" ]; then tar zxf download-cache/pcre2-$PCRE2_VER.tar.gz; cd pcre2-$PCRE2_VER/; ./configure --prefix=$PCRE2_PREFIX --enable-jit --enable-utf > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi
141+
- if [ -n "$OPENSSL_VER" ]; then tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz; cd openssl-$OPENSSL_VER/; patch -p1 < ../../openresty/patches/openssl-$OPENSSL_PATCH_VER-sess_set_get_cb_yield.patch; ./config shared enable-ssl3 enable-ssl3-method -g --prefix=$OPENSSL_PREFIX --libdir=lib -DPURIFY > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo make PATH=$PATH install_sw > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi
140142
- if [ -n "$BORINGSSL" ]; then sudo rm -fr /usr/local/openresty/openssl3/ && sudo mkdir -p /usr/local/openresty/openssl3 && sudo tar -C /usr/local/openresty/openssl3 -xf boringssl-20230902-x64-focal.tar.gz --strip-components=1; fi
141143
- export NGX_BUILD_CC=$CC
142144
- sh util/build-without-ssl.sh $NGINX_VERSION > build.log 2>&1 || (cat build.log && exit 1)

src/ngx_http_lua_ssl_client_helloby.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ ngx_http_lua_ssl_client_hello_handler(ngx_ssl_conn_t *ssl_conn,
193193
ngx_http_lua_ssl_ctx_t *cctx;
194194
ngx_http_core_srv_conf_t *cscf;
195195

196+
196197
c = ngx_ssl_get_connection(ssl_conn);
197198

198199
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
@@ -220,6 +221,15 @@ ngx_http_lua_ssl_client_hello_handler(ngx_ssl_conn_t *ssl_conn,
220221

221222
dd("first time");
222223

224+
#if (nginx_version > 1029000)
225+
/* see commit 0373fe5d98c1515640 for more details */
226+
rc = ngx_ssl_client_hello_callback(ssl_conn, al, arg);
227+
228+
if (rc == 0) {
229+
return rc;
230+
}
231+
#endif
232+
223233
#if (nginx_version < 1017009)
224234
ngx_reusable_connection(c, 0);
225235
#endif

t/014-bugs.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ log_level('debug');
99
repeat_each(3);
1010

1111
# NB: the shutdown_error_log block is independent from repeat times
12-
plan tests => repeat_each() * (blocks() * 2 + 33) + 1;
12+
plan tests => repeat_each() * (blocks() * 2 + 33);
1313

1414
our $HtmlDir = html_dir;
1515
#warn $html_dir;
@@ -1269,6 +1269,8 @@ qr/\[emerg\] \d+#\d+: unexpected "A" in/
12691269
12701270
12711271
=== TEST 47: cosocket does not exit on worker_shutdown_timeout
1272+
This test must enable master process
1273+
--- SKIP
12721274
--- main_config
12731275
worker_shutdown_timeout 1;
12741276
--- config
@@ -1316,7 +1318,6 @@ if ($ENV{TEST_NGINX_USE_HTTP3}) {
13161318
13171319
$expr;
13181320
--- timeout: 1.2
1319-
--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3}
13201321
13211322
13221323

0 commit comments

Comments
 (0)