openresty / openresty/lua-resty-core
Unable to retrieve custom TLS extension in OpenResty
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 853
- Forks
- 286
- Avg merge
- 35m
- Merged PRs (30d)
- 1
Description
Environment
OpenResty Version: openresty/1.27.1.2
Problem
The Lua API ngx.ssl.clienthello.get_client_hello_ext(0x4D59) always returns nil, even though:
Wireshark confirms the extension 0x4D59 is present in the Client Hello's "Outer Extensions" section.
Standard extensions (e.g., SNI type 0) are retrieved successfully using the same API.
Configuration Snippet:
ssl_client_hello_by_lua_block {
local ssl_clt = require "ngx.ssl.clienthello"
local custom_ext = ssl_clt.get_client_hello_ext(0x4D59) -- Always nil
if custom_ext then
ngx.log(ngx.INFO, "Got extension 0x4D59")
else
ngx.log(ngx.INFO, "Extension 0x4D59 not found") -- Always triggered
end
Log Output:
Extension 0x4D59 not found
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ngx.ssl.clienthello.get_client_hello_ext as used in ssl_client_hello_by_lua_block, and compare handling of extension 0x4D59 with the working SNI lookup. Reproduce the request using the OpenResty 1.27.1.2 configuration and confirm that the custom extension is present in the Client Hello's Outer Extensions section. Done means the API retrieves 0x4D59 while standard extensions continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- backend, networking, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100