File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -832,7 +832,7 @@ lua ssl server name: "test.com"
832
832
ssl_protocols TLSv1;
833
833
ssl_ciphers PSK;
834
834
835
- ssl_psk_by_lua_block {
835
+ ssl_certificate_by_lua_block {
836
836
collectgarbage()
837
837
838
838
local ffi = require "ffi"
@@ -849,7 +849,12 @@ lua ssl server name: "test.com"
849
849
local len = ffi.C.ngx_http_lua_ffi_ssl_get_psk_identity_size(r, errmsg)
850
850
851
851
if len < 0 then
852
- ngx.log(ngx.ERR, "failed to get psk identity size: ", ffi.string(errmsg[0]))
852
+ local error_msg = ffi.string(errmsg[0])
853
+ if error_msg and error_msg == "not in psk context" then
854
+ -- handler was not called by TLS-PSK callback
855
+ return
856
+ end
857
+ ngx.log(ngx.ERR, "failed to get psk identity size: ", error_msg)
853
858
return
854
859
end
855
860
You can’t perform that action at this time.
0 commit comments