You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Equivalent to [ssl_psk_by_lua_block](#ssl_psk_by_lua_block), except that the file specified by `<path-to-lua-script-file>` contains the Lua code, or, as from the `v0.5.0rc32` release, the [Lua/LuaJIT bytecode](#lualuajit-bytecode-support) to be executed.
2668
-
2669
-
When a relative path like `foo/bar.lua` is given, they will be turned into the absolute path relative to the `server prefix` path determined by the `-p PATH` command-line option while starting the Nginx server.
2670
-
2671
-
This directive was first introduced in the `v0.XX.YY` release.
ngx.log(ngx.ERR, "Failed to get TLS-PSK Identity: ", err)
2199
-
return ngx.ERROR
2200
-
end
2201
-
2202
-
print("Client TLS-PSK Identity: ", psk_identity)
2203
-
2204
-
local psk_key = "psk_test_key"
2205
-
2206
-
local ok, err = ssl.set_psk_key(psk_key)
2207
-
if not ok then
2208
-
ngx.log(ngx.ERR, "Failed to set TLS-PSK key: ", err)
2209
-
return ngx.ERROR
2210
-
end
2211
-
2212
-
return ngx.OK
2213
-
}
2214
-
2215
-
location / {
2216
-
root html;
2217
-
}
2218
-
}
2219
-
</geshi>
2220
-
2221
-
See more complicated examples in the [https://github.com/vartiait/lua-resty-core/blob/ssl-psk/lib/ngx/ssl.md ngx.ssl]
2222
-
Lua module's official documentation.
2223
-
2224
-
Uncaught Lua exceptions in the user Lua code immediately abort the current SSL session, so does return call with an error code like <code>ngx.ERROR</code>.
2225
-
2226
-
This Lua code execution context *does not* support yielding, so Lua APIs that may yield
2227
-
(like cosockets, sleeping, and "light threads")
2228
-
are disabled in this context.
2229
-
2230
-
Note, however, you still need to configure the [http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_certificate ssl_certificate] and
Equivalent to [[#ssl_psk_by_lua_block|ssl_psk_by_lua_block]], except that the file specified by <code><path-to-lua-script-file></code> contains the Lua code, or, as from the <code>v0.5.0rc32</code> release, the [[#Lua/LuaJIT bytecode support|Lua/LuaJIT bytecode]] to be executed.
2253
-
2254
-
When a relative path like <code>foo/bar.lua</code> is given, they will be turned into the absolute path relative to the <code>server prefix</code> path determined by the <code>-p PATH</code> command-line option while starting the Nginx server.
2255
-
2256
-
This directive was first introduced in the <code>v0.XX.YY</code> release.
0 commit comments