From f506d77432422e0caf976e89ddefdd723dd8d9b1 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Wed, 16 Apr 2025 17:42:57 +0800 Subject: [PATCH 1/9] fix: ci runner --- .github/workflows/ci.yml | 2 +- .github/workflows/lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8192b7..990808f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - "1.25.3.1" - "1.27.1.1" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" env: OPENRESTY_VERSION: ${{ matrix.op_version }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ea3ccf9..f309331 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: Check out code From df415e26c1a3344d05d584d104a3762b26965e75 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Wed, 16 Apr 2025 18:25:15 +0800 Subject: [PATCH 2/9] fix: use gcc --- .github/workflows/ci.yml | 6 ++++-- .github/workflows/gm.yml | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 990808f..25a8736 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,8 +24,10 @@ jobs: - name: Check out code uses: actions/checkout@v2 - - name: Set up Clang - uses: egor-tensin/setup-clang@v1 + - name: Set up build environment + run: | + sudo apt update + sudo apt install -y git wget build-essential - name: Get dependencies run: | diff --git a/.github/workflows/gm.yml b/.github/workflows/gm.yml index d9dc8aa..6049aef 100644 --- a/.github/workflows/gm.yml +++ b/.github/workflows/gm.yml @@ -16,8 +16,10 @@ jobs: - name: Check out code uses: actions/checkout@v2 - - name: Set up Clang - uses: egor-tensin/setup-clang@v1 + - name: Set up build environment + run: | + sudo apt update + sudo apt install -y git wget build-essential - name: Get dependencies run: sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl @@ -31,7 +33,7 @@ jobs: run: | # TODO: use a fixed release once they have created one. # See https://github.com/Tongsuo-Project/Tongsuo/issues/318 - git clone https://github.com/api7/tongsuo --depth 1 + git clone https://github.com/Tongsuo-Project/Tongsuo -b 8.4.0 --depth 1 pushd tongsuo ./config shared enable-ntls -g --prefix=/usr/local/tongsuo make -j2 From 0408abdc9f017f76aec47c65f3aa8d7800d60ab2 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Sat, 19 Apr 2025 09:28:16 +0800 Subject: [PATCH 3/9] fix: push case sensitive --- .github/workflows/gm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gm.yml b/.github/workflows/gm.yml index 6049aef..fe82d77 100644 --- a/.github/workflows/gm.yml +++ b/.github/workflows/gm.yml @@ -33,7 +33,7 @@ jobs: run: | # TODO: use a fixed release once they have created one. # See https://github.com/Tongsuo-Project/Tongsuo/issues/318 - git clone https://github.com/Tongsuo-Project/Tongsuo -b 8.4.0 --depth 1 + git clone -b 8.4.0 --depth 1 https://github.com/Tongsuo-Project/Tongsuo tongsuo pushd tongsuo ./config shared enable-ntls -g --prefix=/usr/local/tongsuo make -j2 From dc4b656a87e46ce88afada148ca5d284f201b096 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Sat, 19 Apr 2025 09:46:46 +0800 Subject: [PATCH 4/9] chore: use gcc again --- .github/workflows/ci.yml | 2 +- .github/workflows/gm.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25a8736..7cab8a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: run: | wget https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-base.sh chmod +x build-apisix-base.sh - OR_PREFIX=$OPENRESTY_PREFIX CC="clang -fsanitize=address -fcolor-diagnostics -Qunused-arguments" \ + OR_PREFIX=$OPENRESTY_PREFIX CC="gcc -fsanitize=address -fdiagnostics-color=always -Wno-unused-but-set-variable -Wno-unused-parameter" \ cc_opt="-Werror" ./build-apisix-base.sh latest diff --git a/.github/workflows/gm.yml b/.github/workflows/gm.yml index fe82d77..a68c508 100644 --- a/.github/workflows/gm.yml +++ b/.github/workflows/gm.yml @@ -52,7 +52,7 @@ jobs: export cc_opt="-I${openssl_prefix}/include -Werror" export ld_opt="-L${openssl_prefix}/lib64 -Wl,-rpath,${openssl_prefix}/lib64" - OR_PREFIX=$OPENRESTY_PREFIX CC="clang -fsanitize=address -fcolor-diagnostics -Qunused-arguments" \ + OR_PREFIX=$OPENRESTY_PREFIX CC="gcc -fsanitize=address -fdiagnostics-color=always -Wno-unused-but-set-variable -Wno-unused-parameter" \ ./build-apisix-base.sh latest - name: Script From 561126e076f73a844d0684f6d9152f0b85966052 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Sat, 19 Apr 2025 09:55:03 +0800 Subject: [PATCH 5/9] fix: http3 --- .github/workflows/gm.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gm.yml b/.github/workflows/gm.yml index a68c508..e3253b5 100644 --- a/.github/workflows/gm.yml +++ b/.github/workflows/gm.yml @@ -47,6 +47,7 @@ jobs: - name: Install run: | wget https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-base.sh + sed -i '/--with-http_v3_module[[:space:]]*\\$/d' config.txt ## tongsuo does not support quic tls chmod +x build-apisix-base.sh export openssl_prefix=/usr/local/tongsuo From d777d43273c5a928da584f5c342da7acdc6f35e6 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Sat, 19 Apr 2025 10:04:36 +0800 Subject: [PATCH 6/9] fix --- .github/workflows/gm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gm.yml b/.github/workflows/gm.yml index e3253b5..e782d91 100644 --- a/.github/workflows/gm.yml +++ b/.github/workflows/gm.yml @@ -47,7 +47,7 @@ jobs: - name: Install run: | wget https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-base.sh - sed -i '/--with-http_v3_module[[:space:]]*\\$/d' config.txt ## tongsuo does not support quic tls + sed -i '/--with-http_v3_module[[:space:]]*\\$/d' build-apisix-base.sh ## tongsuo does not support quic tls chmod +x build-apisix-base.sh export openssl_prefix=/usr/local/tongsuo From 4abf4120a241ef254fae3cac769cd56c491308cb Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Sat, 19 Apr 2025 10:30:41 +0800 Subject: [PATCH 7/9] debug --- t/gm.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/gm.t b/t/gm.t index c5a3d69..fe54d88 100644 --- a/t/gm.t +++ b/t/gm.t @@ -353,7 +353,7 @@ SSL_do_handshake() failed if ngx.shared.done:get("handshake") then local out = f:read('*a') ngx.log(ngx.INFO, out) - ngx.say("ok") + ngx.say("ok", out) f:close() return end @@ -369,3 +369,5 @@ New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384 [error] [alert] [emerg] +--- response_body +123 From 89f1978ceeef35539698eb5ac7867e0043ba2ed2 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Sat, 19 Apr 2025 10:45:28 +0800 Subject: [PATCH 8/9] fix: error by tlsv1.3 --- t/gm.t | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/gm.t b/t/gm.t index fe54d88..91be80b 100644 --- a/t/gm.t +++ b/t/gm.t @@ -353,7 +353,7 @@ SSL_do_handshake() failed if ngx.shared.done:get("handshake") then local out = f:read('*a') ngx.log(ngx.INFO, out) - ngx.say("ok", out) + ngx.say("ok") f:close() return end @@ -364,10 +364,8 @@ SSL_do_handshake() failed } --- error_log -New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384 +New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384 --- no_error_log [error] [alert] [emerg] ---- response_body -123 From 4846964f5ee3e841051f5e07f78dfcfbdca1d291 Mon Sep 17 00:00:00 2001 From: bzp2010 Date: Sat, 19 Apr 2025 11:41:14 +0800 Subject: [PATCH 9/9] chore: clean unused comment --- .github/workflows/gm.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/gm.yml b/.github/workflows/gm.yml index e782d91..ae9e646 100644 --- a/.github/workflows/gm.yml +++ b/.github/workflows/gm.yml @@ -31,8 +31,6 @@ jobs: - name: Install SSL lib run: | - # TODO: use a fixed release once they have created one. - # See https://github.com/Tongsuo-Project/Tongsuo/issues/318 git clone -b 8.4.0 --depth 1 https://github.com/Tongsuo-Project/Tongsuo tongsuo pushd tongsuo ./config shared enable-ntls -g --prefix=/usr/local/tongsuo