Skip to content

Commit 9688812

Browse files
tests: bumped openssl to v3.4.1.
1 parent 1f4d846 commit 9688812

File tree

5 files changed

+28
-74
lines changed

5 files changed

+28
-74
lines changed

.travis.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ addons:
2929
- libunwind-dev
3030
- wget
3131
- libbrotli1
32+
- lsb-release
33+
- wget
34+
- gnupg
35+
- ca-certificates
3236

3337
cache:
3438
directories:
@@ -42,13 +46,10 @@ env:
4246
- LUAJIT_LIB=$LUAJIT_PREFIX/lib
4347
- LUAJIT_INC=$LUAJIT_PREFIX/include/luajit-2.1
4448
- LUA_INCLUDE_DIR=$LUAJIT_INC
45-
- PCRE_PREFIX=/opt/pcre
46-
- PCRE2_PREFIX=/opt/pcre2
49+
- PCRE_PREFIX=/usr/local/openresty/pcre2
4750
- PCRE_LIB=$PCRE_PREFIX/lib
48-
- PCRE2_LIB=$PCRE2_PREFIX/lib
4951
- PCRE_INC=$PCRE_PREFIX/include
50-
- PCRE2_INC=$PCRE2_PREFIX/include
51-
- OPENSSL_PREFIX=/opt/ssl
52+
- OPENSSL_PREFIX=/usr/local/openresty/openssl3
5253
- OPENSSL_LIB=$OPENSSL_PREFIX/lib
5354
- OPENSSL_INC=$OPENSSL_PREFIX/include
5455
- LIBDRIZZLE_PREFIX=/opt/drizzle
@@ -59,14 +60,10 @@ env:
5960
- TEST_NGINX_SLEEP=0.006
6061
- MALLOC_PERTURB_=9
6162
jobs:
62-
#- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f
63-
#- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w TEST_NGINX_USE_HTTP2=1
64-
- NGINX_VERSION=1.27.1 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f TEST_NGINX_TIMEOUT=5 PCRE_VER=8.45
65-
- NGINX_VERSION=1.27.1 OPENSSL_VER=3.0.15 OPENSSL_PATCH_VER=3.0.15 TEST_NGINX_TIMEOUT=5 PCRE2_VER=10.42
66-
- NGINX_VERSION=1.27.1 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f TEST_NGINX_TIMEOUT=5 PCRE_VER=8.45 TEST_NGINX_USE_HTTP2=1
67-
- NGINX_VERSION=1.27.1 OPENSSL_VER=3.0.15 OPENSSL_PATCH_VER=3.0.15 TEST_NGINX_TIMEOUT=5 PCRE2_VER=10.42 TEST_NGINX_USE_HTTP2=1
68-
- NGINX_VERSION=1.27.1 OPENSSL_VER=3.0.15 OPENSSL_PATCH_VER=3.0.15 TEST_NGINX_USE_HTTP3=1 TEST_NGINX_QUIC_IDLE_TIMEOUT=3 PCRE2_VER=10.42
69-
- NGINX_VERSION=1.27.1 BORINGSSL=1 TEST_NGINX_USE_HTTP3=1 TEST_NGINX_QUIC_IDLE_TIMEOUT=3 PCRE2_VER=10.42
63+
- NGINX_VERSION=1.27.1 OPENSSL_VER=3.4.1 OPENSSL_PATCH_VER=3.4.1 TEST_NGINX_TIMEOUT=5 PCRE2_VER=10.45
64+
- NGINX_VERSION=1.27.1 OPENSSL_VER=3.4.1 OPENSSL_PATCH_VER=3.4.1 TEST_NGINX_TIMEOUT=5 PCRE2_VER=10.45 TEST_NGINX_USE_HTTP2=1
65+
- NGINX_VERSION=1.27.1 OPENSSL_VER=3.4.1 OPENSSL_PATCH_VER=3.4.1 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
7067

7168
services:
7269
- memcached
@@ -77,15 +74,16 @@ before_install:
7774
- '! grep -n -P ''(?<=.{80}).+'' --color `find src -name ''*.c''` `find . -name ''*.h''` || (echo "ERROR: Found C source lines exceeding 80 columns." > /dev/stderr; exit 1)'
7875
- '! grep -n -P ''\t+'' --color `find src -name ''*.c''` `find . -name ''*.h''` || (echo "ERROR: Cannot use tabs." > /dev/stderr; exit 1)'
7976
- /usr/bin/env perl $(command -v cpanm) --sudo --notest Test::Nginx IPC::Run > build.log 2>&1 || (cat build.log && exit 1)
77+
- wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
78+
- echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list
79+
- sudo apt-get update
80+
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends openresty-pcre2 openresty-openssl3 openresty-pcre2-dev openresty-openssl3-dev
81+
8082

8183
install:
8284
- 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
83-
#- if [ -n "$PCRE_VER" ] && [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VER}/pcre-${PCRE_VER}.tar.gz; fi
8485
#- 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
8586
#- 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
86-
- if [ -n "$OPENSSL_VER" ]; then wget https://github.com/openresty/openresty-deps-prebuild/releases/download/v1.0.0/openssl-${OPENSSL_VER}-x64-focal.tar.gz; fi
87-
- if [ -n "$PCRE_VER" ]; then wget https://github.com/openresty/openresty-deps-prebuild/releases/download/v1.0.0/pcre-${PCRE_VER}-x64-focal.tar.gz; fi
88-
- if [ -n "$PCRE2_VER" ]; then wget https://github.com/openresty/openresty-deps-prebuild/releases/download/v1.0.0/pcre2-${PCRE2_VER}-x64-focal.tar.gz; fi
8987
- wget https://github.com/openresty/openresty-deps-prebuild/releases/download/v20230902/boringssl-20230902-x64-focal.tar.gz
9088
- wget https://github.com/openresty/openresty-deps-prebuild/releases/download/v20230902/curl-h3-x64-focal.tar.gz
9189
- git clone https://github.com/openresty/test-nginx.git
@@ -137,13 +135,9 @@ script:
137135
- sudo make install-libdrizzle-1.0 > build.log 2>&1 || (cat build.log && exit 1)
138136
- cd ../mockeagain/ && make CC=$CC -j$JOBS && cd ..
139137
- cd lua-cjson/ && make -j$JOBS && sudo make install && cd ..
140-
#- if [ -n "PCRE_VER" ]; then tar zxf download-cache/pcre-$PCRE_VER.tar.gz; cd pcre-$PCRE_VER/; ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > 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
141138
#- 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
142139
#- 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
143-
- if [ -n "$BORINGSSL" ]; then sudo mkdir -p /opt/ssl && sudo tar -C /opt/ssl -xf boringssl-20230902-x64-focal.tar.gz --strip-components=1; fi
144-
- if [ -n "$OPENSSL_VER" ]; then sudo mkdir -p /opt/ssl && sudo tar -C /opt/ssl -xf openssl-$OPENSSL_VER-x64-focal.tar.gz --strip-components=2; fi
145-
- if [ -n "$PCRE_VER" ]; then sudo mkdir -p $PCRE_PREFIX && sudo tar -C $PCRE_PREFIX -xf pcre-$PCRE_VER-x64-focal.tar.gz --strip-components=2; fi
146-
- if [ -n "$PCRE2_VER" ]; then sudo mkdir -p $PCRE2_PREFIX && sudo tar -C $PCRE2_PREFIX -xf pcre2-$PCRE2_VER-x64-focal.tar.gz --strip-components=2; fi
140+
- if [ -n "$BORINGSSL" ]; then sudo rm -fr /usr/local/openresty/openssl3/ && sudo tar -C /usr/local/openresty/openssl3 -xf boringssl-20230902-x64-focal.tar.gz --strip-components=1; fi
147141
- export NGX_BUILD_CC=$CC
148142
- sh util/build-without-ssl.sh $NGINX_VERSION > build.log 2>&1 || (cat build.log && exit 1)
149143
- sh util/build-with-dd.sh $NGINX_VERSION > build.log 2>&1 || (cat build.log && exit 1)
@@ -160,4 +154,4 @@ script:
160154
- dig +short myip.opendns.com @resolver1.opendns.com || exit 0
161155
- dig +short @$TEST_NGINX_RESOLVER openresty.org || exit 0
162156
- dig +short @$TEST_NGINX_RESOLVER agentzh.org || exit 0
163-
- /usr/bin/env perl $(command -v prove) -I. -Itest-nginx/lib -r t/
157+
- /usr/bin/env perl $(command -v prove) -I. -Itest-nginx/inc -Itest-nginx/lib -r t/

t/143-ssl-session-fetch.t

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ ssl_session_fetch_by_lua\(nginx\.conf:25\):1: ssl fetch sess by lua is running!,
142142
server_tokens off;
143143
resolver $TEST_NGINX_RESOLVER ipv6=off;
144144
lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt;
145-
lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2;
145+
lua_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
146146
147147
location /t {
148148
set $port $TEST_NGINX_MEMCACHED_PORT;
@@ -199,6 +199,7 @@ qr/elapsed in ssl fetch session by lua: 0.(?:09|1[01])\d+,/,
199199
[error]
200200
[alert]
201201
[emerg]
202+
--- skip_openssl: 6: > 1.1.1w
202203
203204
204205
@@ -388,6 +389,7 @@ qr/received memc reply: OK/s
388389
[alert]
389390
[error]
390391
[emerg]
392+
--- skip_openssl: 6: > 1.1.1w
391393
392394
393395
@@ -635,6 +637,7 @@ qr/ssl_session_fetch_by_lua\*: sess get cb exit code: 0/s
635637
should never reached here
636638
[alert]
637639
[emerg]
640+
--- skip_openssl: 6: > 1.1.1w
638641
639642
640643
@@ -804,6 +807,7 @@ ssl_session_fetch_by_lua*: sess get cb exit code: 0
804807
should never reached here
805808
[alert]
806809
[emerg]
810+
--- skip_openssl: 6: > 1.1.1w
807811
808812
809813
@@ -991,6 +995,7 @@ ssl store session by lua is running!
991995
[error]
992996
[alert]
993997
[emerg]
998+
--- skip_openssl: 6: > 1.1.1w
994999
9951000
9961001
@@ -1399,6 +1404,7 @@ qr/elapsed in ssl_session_fetch_by_lua\*: 0\.(?:09|1[01])\d+,/,
13991404
[error]
14001405
[alert]
14011406
[emerg]
1407+
--- skip_openssl: 6: > 1.1.1w
14021408
14031409
14041410
@@ -1494,6 +1500,7 @@ close: 1 nil
14941500
[alert]
14951501
[error]
14961502
[emerg]
1503+
--- skip_openssl: 6: > 1.1.1w
14971504
14981505
14991506
@@ -1695,3 +1702,4 @@ uthread: failed to kill: already waited or killed
16951702
[alert]
16961703
[error]
16971704
[emerg]
1705+
--- skip_openssl: 6: > 1.1.1w

util/build-with-dd.sh

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,13 @@ force=$2
1212

1313
add_fake_shm_module="--add-module=$root/t/data/fake-shm-module"
1414

15-
add_http3_module=--with-http_v3_module
16-
answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1`
17-
if [ "$OPENSSL_VER" = "1.1.0l" ] || [ "$answer" = "N" ]; then
18-
add_http3_module=""
19-
fi
20-
21-
disable_pcre2=--without-pcre2
22-
answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1`
23-
if [ "$answer" = "N" ] || [ "$USE_PCRE2" = "Y" ]; then
24-
disable_pcre2=""
25-
fi
26-
if [ "$USE_PCRE2" = "Y" ]; then
27-
PCRE_INC=$PCRE2_INC
28-
PCRE_LIB=$PCRE2_LIB
29-
fi
30-
3115
time ngx-build $force $version \
3216
--with-threads \
3317
--with-pcre-jit \
34-
$disable_pcre2 \
3518
--with-ipv6 \
3619
--with-cc-opt="-DNGX_LUA_USE_ASSERT -I$PCRE_INC -I$OPENSSL_INC -DDDEBUG=1" \
3720
--with-http_v2_module \
38-
$add_http3_module \
21+
--with-http_v3_module \
3922
--with-http_realip_module \
4023
--with-http_ssl_module \
4124
--add-module=$root/../ndk-nginx-module \

util/build-without-ssl.sh

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,12 @@ version=${1:-1.4.1}
1010
home=~
1111
force=$2
1212

13-
# the ngx-build script is from https://github.com/agentzh/nginx-devel-utils
14-
15-
#--add-module=$home/work/nginx_upload_module-2.2.0 \
16-
17-
#--without-pcre \
18-
#--without-http_rewrite_module \
19-
#--without-http_autoindex_module \
20-
#--with-cc=gcc46 \
21-
#--with-cc=clang \
22-
#--without-http_referer_module \
23-
#--with-http_spdy_module \
24-
2513
add_fake_shm_module="--add-module=$root/t/data/fake-shm-module"
2614

27-
disable_pcre2=--without-pcre2
28-
answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1`
29-
if [ "$answer" = "N" ] || [ -n "$PCRE2_VER" ]; then
30-
disable_pcre2=""
31-
fi
32-
if [ -n "$PCRE2_VER" ]; then
33-
PCRE_INC=$PCRE2_INC
34-
PCRE_LIB=$PCRE2_LIB
35-
fi
36-
15+
rm -fr buildroot
3716
time ngx-build $force $version \
3817
--with-threads \
3918
--with-pcre-jit \
40-
$disable_pcre2 \
4119
--with-ipv6 \
4220
--with-cc-opt="-DNGX_LUA_USE_ASSERT -I$PCRE_INC" \
4321
--with-http_v2_module \

util/build.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,11 @@ if [ "$OPENSSL_VER" = "1.1.0l" ] || [ "$answer" = "N" ]; then
3030
add_http3_module=""
3131
fi
3232

33-
disable_pcre2=--without-pcre2
3433
answer=`$root/util/ver-ge "$version" 1.25.1`
35-
if [ "$answer" = "N" ] || [ "$USE_PCRE2" = "Y" ]; then
36-
disable_pcre2=""
37-
fi
38-
if [ "$USE_PCRE2" = "Y" ]; then
39-
PCRE_INC=$PCRE2_INC
40-
PCRE_LIB=$PCRE2_LIB
41-
fi
4234

4335
time ngx-build $force $version \
4436
--with-threads \
4537
--with-pcre-jit \
46-
$disable_pcre2 \
4738
--with-ipv6 \
4839
--with-cc-opt="-DNGX_LUA_USE_ASSERT -I$PCRE_INC -I$OPENSSL_INC" \
4940
--with-http_v2_module \

0 commit comments

Comments
 (0)