This is an automated email from the ASF dual-hosted git repository. membphis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push: new 9aa1833 ci: use build-apisix-openresty.sh instead (#3847) 9aa1833 is described below commit 9aa18337229f2297f09d71a3ea86562ba4baa344 Author: 罗泽轩 <spacewander...@gmail.com> AuthorDate: Tue Mar 23 20:07:48 2021 +0800 ci: use build-apisix-openresty.sh instead (#3847) --- t/config-center-yaml/ssl.t | 4 ++-- t/plugin/redirect.t | 4 ++-- t/router/multi-ssl-certs.t | 14 ++++++------ t/router/radixtree-sni.t | 42 ++++++++++++++++++------------------ t/router/radixtree-sni2.t | 14 ++++++------ utils/linux-install-openresty.sh | 46 +++------------------------------------- 6 files changed, 42 insertions(+), 82 deletions(-) diff --git a/t/config-center-yaml/ssl.t b/t/config-center-yaml/ssl.t index 673cdc0..961b625 100644 --- a/t/config-center-yaml/ssl.t +++ b/t/config-center-yaml/ssl.t @@ -175,7 +175,7 @@ end received: HTTP/1.1 200 OK close: 1 nil --- error_log -lua ssl server name: "test.com" +server name: "test.com" @@ -246,4 +246,4 @@ end received: HTTP/1.1 200 OK close: 1 nil --- error_log -lua ssl server name: "test.com" +server name: "test.com" diff --git a/t/plugin/redirect.t b/t/plugin/redirect.t index 377a046..768ddd3 100644 --- a/t/plugin/redirect.t +++ b/t/plugin/redirect.t @@ -635,7 +635,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) local req = "GET /hello HTTP/1.0\r\nHost: test.com\r\nConnection: close\r\n\r\n" local bytes, err = sock:send(req) @@ -666,7 +666,7 @@ location /t { GET /t --- response_body eval qr{connected: 1 -ssl handshake: userdata +ssl handshake: true sent http request: 58 bytes. received: HTTP/1.1 200 OK received: Content-Type: text/plain diff --git a/t/router/multi-ssl-certs.t b/t/router/multi-ssl-certs.t index 02b2536..1c302f9 100644 --- a/t/router/multi-ssl-certs.t +++ b/t/router/multi-ssl-certs.t @@ -124,7 +124,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) local req = "GET /hello HTTP/1.0\r\nHost: www.test.com\r\nConnection: close\r\n\r\n" local bytes, err = sock:send(req) @@ -155,7 +155,7 @@ location /t { GET /t --- response_body eval qr{connected: 1 -ssl handshake: userdata +ssl handshake: true sent http request: 62 bytes. received: HTTP/1.1 200 OK received: Content-Type: text/plain @@ -165,7 +165,7 @@ received: Server: APISIX/\d\.\d+(\.\d+)? received: \nreceived: hello world close: 1 nil} --- error_log -lua ssl server name: "www.test.com" +server name: "www.test.com" --- no_error_log [error] [alert] @@ -238,7 +238,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -249,7 +249,7 @@ GET /t connected: 1 failed to do SSL handshake: 18: self signed certificate --- error_log -lua ssl server name: "www.test2.com" +server name: "www.test2.com" we have more than 1 ssl certs now --- no_error_log [error] @@ -323,7 +323,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -334,7 +334,7 @@ GET /t connected: 1 failed to do SSL handshake: 18: self signed certificate --- error_log -lua ssl server name: "apisix.dev" +server name: "apisix.dev" we have more than 1 ssl certs now --- no_error_log [error] diff --git a/t/router/radixtree-sni.t b/t/router/radixtree-sni.t index 479e0a4..b8494d3 100644 --- a/t/router/radixtree-sni.t +++ b/t/router/radixtree-sni.t @@ -124,7 +124,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) local req = "GET /hello HTTP/1.0\r\nHost: www.test.com\r\nConnection: close\r\n\r\n" local bytes, err = sock:send(req) @@ -155,7 +155,7 @@ location /t { GET /t --- response_body eval qr{connected: 1 -ssl handshake: userdata +ssl handshake: true sent http request: 62 bytes. received: HTTP/1.1 200 OK received: Content-Type: text/plain @@ -165,7 +165,7 @@ received: Server: APISIX/\d\.\d+(\.\d+)? received: \nreceived: hello world close: 1 nil} --- error_log -lua ssl server name: "www.test.com" +server name: "www.test.com" --- no_error_log [error] [alert] @@ -278,7 +278,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) local req = "GET /hello HTTP/1.0\r\nHost: www.test.com\r\nConnection: close\r\n\r\n" local bytes, err = sock:send(req) @@ -309,7 +309,7 @@ location /t { GET /t --- response_body eval qr{connected: 1 -ssl handshake: userdata +ssl handshake: true sent http request: 62 bytes. received: HTTP/1.1 200 OK received: Content-Type: text/plain @@ -319,7 +319,7 @@ received: Server: APISIX/\d\.\d+(\.\d+)? received: \nreceived: hello world close: 1 nil} --- error_log -lua ssl server name: "www.test.com" +server name: "www.test.com" --- no_error_log [error] [alert] @@ -392,7 +392,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) local req = "GET /hello HTTP/1.0\r\nHost: test.com\r\nConnection: close\r\n\r\n" local bytes, err = sock:send(req) @@ -423,7 +423,7 @@ location /t { GET /t --- response_body eval qr{connected: 1 -ssl handshake: userdata +ssl handshake: true sent http request: 58 bytes. received: HTTP/1.1 200 OK received: Content-Type: text/plain @@ -433,7 +433,7 @@ received: Server: APISIX/\d\.\d+(\.\d+)? received: \nreceived: hello world close: 1 nil} --- error_log -lua ssl server name: "test.com" +server name: "test.com" --- no_error_log [error] [alert] @@ -506,7 +506,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -517,7 +517,7 @@ GET /t connected: 1 failed to do SSL handshake: 18: self signed certificate --- error_log -lua ssl server name: "www.test2.com" +server name: "www.test2.com" --- no_error_log [error] [alert] @@ -552,7 +552,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -563,7 +563,7 @@ GET /t connected: 1 failed to do SSL handshake: handshake failed --- error_log -lua ssl server name: "aa.bb.test2.com" +server name: "aa.bb.test2.com" failed to find any SSL certificate by SNI: aa.bb.test2.com matched SNI: *.test2.com --- no_error_log [alert] @@ -634,7 +634,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -645,7 +645,7 @@ GET /t connected: 1 failed to do SSL handshake: handshake failed --- error_log -lua ssl server name: "www.test2.com" +server name: "www.test2.com" --- no_error_log [alert] @@ -715,7 +715,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -726,7 +726,7 @@ GET /t connected: 1 failed to do SSL handshake: 18: self signed certificate --- error_log -lua ssl server name: "www.test2.com" +server name: "www.test2.com" --- no_error_log [error] [alert] @@ -799,7 +799,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -810,7 +810,7 @@ GET /t connected: 1 failed to do SSL handshake: 18: self signed certificate --- error_log -lua ssl server name: "test2.com" +server name: "test2.com" --- no_error_log [error] [alert] @@ -845,7 +845,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -856,7 +856,7 @@ GET /t connected: 1 failed to do SSL handshake: handshake failed --- error_log -lua ssl server name: "aa.bb.test2.com" +server name: "aa.bb.test2.com" failed to find any SSL certificate by SNI: aa.bb.test2.com matched SNIs: ["*.test2.com","test2.com"] --- no_error_log [alert] diff --git a/t/router/radixtree-sni2.t b/t/router/radixtree-sni2.t index e6a87eb..e3ec3b7 100644 --- a/t/router/radixtree-sni2.t +++ b/t/router/radixtree-sni2.t @@ -100,7 +100,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -109,7 +109,7 @@ location /t { GET /t --- response_body connected: 1 -ssl handshake: userdata +ssl handshake: true @@ -143,7 +143,7 @@ location /t { return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) end -- do -- collectgarbage() } @@ -152,7 +152,7 @@ location /t { GET /t --- response_body connected: 1 -ssl handshake: userdata +ssl handshake: true @@ -221,7 +221,7 @@ location /t { ngx.say("failed to do SSL handshake: ", err) return end - ngx.say("ssl handshake: ", type(sess)) + ngx.say("ssl handshake: ", sess ~= nil) local ok, err = sock:close() ngx.say("close: ", ok, " ", err) end -- do @@ -236,10 +236,10 @@ location /t { GET /t --- response_body eval qr{connected: 1 -ssl handshake: userdata +ssl handshake: true close: 1 nil connected: 1 -ssl handshake: userdata +ssl handshake: true close: 1 nil} --- grep_error_log eval qr/parsing (cert|(priv key)) for sni: www.test2.com/ diff --git a/utils/linux-install-openresty.sh b/utils/linux-install-openresty.sh index 6bdde1f..9f6f876 100755 --- a/utils/linux-install-openresty.sh +++ b/utils/linux-install-openresty.sh @@ -26,49 +26,9 @@ sudo apt-get update if [ "$OPENRESTY_VERSION" == "source" ]; then cd .. - - wget https://openresty.org/download/openresty-1.19.3.1.tar.gz - tar -zxvpf openresty-1.19.3.1.tar.gz - - git clone --depth=1 https://github.com/api7/ngx_multi_upstream_module.git - cd ngx_multi_upstream_module || exit 1 - ./patch.sh ../openresty-1.19.3.1 - - git clone --depth=1 https://github.com/api7/mod_dubbo.git ../mod_dubbo - - cd ../openresty-1.19.3.1 || exit 1 - ./configure --prefix="/usr/local/openresty-debug" \ - --add-module=../mod_dubbo --add-module=../ngx_multi_upstream_module \ - --with-debug \ - --with-poll_module \ - --with-pcre-jit \ - --without-http_rds_json_module \ - --without-http_rds_csv_module \ - --without-lua_rds_parser \ - --with-stream \ - --with-stream_ssl_module \ - --with-stream_ssl_preread_module \ - --with-http_v2_module \ - --without-mail_pop3_module \ - --without-mail_imap_module \ - --without-mail_smtp_module \ - --with-http_stub_status_module \ - --with-http_realip_module \ - --with-http_addition_module \ - --with-http_auth_request_module \ - --with-http_secure_link_module \ - --with-http_random_index_module \ - --with-http_gzip_static_module \ - --with-http_sub_module \ - --with-http_dav_module \ - --with-http_flv_module \ - --with-http_mp4_module \ - --with-http_gunzip_module \ - --with-threads \ - --with-compat \ - --with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' - make - sudo make install + wget https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-openresty.sh + chmod +x build-apisix-openresty.sh + ./build-apisix-openresty.sh latest sudo apt-get install openresty-openssl111-debug-dev exit 0