Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ggboss opened this issue Nov 29, 2022 · 6 comments

Comments

@ggboss
Copy link

ggboss commented Nov 29, 2022

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.

@oowl
Copy link
Contributor

oowl commented Nov 29, 2022

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

@ggboss
Copy link
Author

ggboss commented Nov 29, 2022

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

@oowl
Copy link
Contributor

oowl commented Nov 29, 2022

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

@ggboss
Copy link
Author

ggboss commented Nov 29, 2022

Thank friend, I'll debug again for a while

@ggboss ggboss closed this as completed Nov 29, 2022
@ggboss
Copy link
Author

ggboss commented Nov 29, 2022

hope someone proposes a good solution

@ggboss ggboss reopened this Nov 30, 2022
@xuruidong
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants