lua-resty-core icon indicating copy to clipboard operation
lua-resty-core copied to clipboard

I want to get all the extension information of client hello, not just server name , what can I do?

Open ggboss opened this issue 3 years ago • 6 comments

local ssl_clt = require "ngx.ssl.clienthello" local ext = ssl_clt.get_client_hello_ext(0)

The ext_type represented by 0 is server name, is there any other ext_type?

I want to get supported_groups and ec_point_formats.

ggboss avatar Nov 29 '22 08:11 ggboss

You can refer to this function https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/ssl/clienthello.lua#L145 to write your own function

oowl avatar Nov 29 '22 08:11 oowl

I don't know what types are supported by ext_type, I don't see the definition anywhere

The source code has been traced back to the openssl SSL_client_hello_get0_ext()

I guess calling get_client_hello_ext() and passing in ext_type will get the supported_groups information, but I don't see what ext_type supported_groups belong to

ggboss avatar Nov 29 '22 09:11 ggboss

I can not find type define in OpenSSl doc, But I used Wireshark's packet hexdump see it, Maybe you can use wireshark to debug.

image

oowl avatar Nov 29 '22 09:11 oowl

Thank friend, I'll debug again for a while

ggboss avatar Nov 29 '22 09:11 ggboss

hope someone proposes a good solution

ggboss avatar Nov 29 '22 15:11 ggboss