@@ -2183,7 +2183,7 @@ failed to create OCSP request: output buffer too small: 68 > 67
21832183 local req, err = ssl.create_ocsp_request(cert_data, 67)
21842184 if not req then
21852185 ngx.log(ngx.ERR, "failed to create OCSP request: ", err)
2186- return
2186+ return ngx.exit(ngx.ERROR)
21872187 end
21882188
21892189 ngx.log(ngx.WARN, "OCSP request created with length ", #req)
@@ -2242,7 +2242,7 @@ failed to create OCSP request: output buffer too small: 68 > 67
22422242GET /t
22432243--- response_body
22442244connected: 1
2245- ssl handshake: userdata
2245+ failed to do SSL handshake: handshake failed
22462246
22472247--- error_log
22482248lua ssl server name: "test.com"
@@ -2823,7 +2823,6 @@ OCSP response validation ok
28232823
28242824
28252825=== TEST 28: fail to validate OCSP response - OCSP response returns revoked status
2826-
28272826--- http_config
28282827 lua_package_path "t/lib/?.lua;lua/?.lua;../lua-resty-core/lib/?.lua;;";
28292828
@@ -2840,7 +2839,7 @@ OCSP response validation ok
28402839 cert_data, err = ssl.cert_pem_to_der(cert_data)
28412840 if not cert_data then
28422841 ngx.log(ngx.ERR, "failed to convert pem cert to der cert: ", err)
2843- return
2842+ return ngx.exit(ngx.ERROR)
28442843 end
28452844
28462845 local f = assert(io.open("t/cert/ocsp/revoked-ocsp-resp.der"))
@@ -2850,7 +2849,7 @@ OCSP response validation ok
28502849 local req, err = ssl.validate_ocsp_response(resp, cert_data)
28512850 if not req then
28522851 ngx.log(ngx.ERR, "failed to validate OCSP response: ", err)
2853- return
2852+ return ngx.exit(ngx.ERROR)
28542853 end
28552854
28562855 ngx.log(ngx.WARN, "OCSP response validation ok")
@@ -2904,7 +2903,7 @@ OCSP response validation ok
29042903GET /t
29052904--- response_body
29062905connected: 1
2907- ssl handshake: userdata
2906+ failed to do SSL handshake: handshake failed
29082907
29092908--- error_log
29102909lua ssl server name: "test.com"
0 commit comments