-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feature: added new ffi function ngx_http_lua_ffi_ssl_ciphers. #1958
Conversation
3a52cb4
to
3a99dad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two more ideas:
- we'd better pass a memory buffer pointer from Lua to reduce memory allocation in the connection pool. But the current implementation is also acceptable to me.
- we can call
ngx_ssl_get_ciphers
in thengx_http_lua_ffi_ssl_ciphers
function if we decide to allocation memory from the connection pool to avoid coping code.
daea3dd
to
dbd9812
Compare
I prefer the latter one because it is hard to decide the length of the buffer. |
The output format of ssl_get_chipers is imho ineffective for what it is useful for. What I would like to get out is Also, SSL_get_shared_chipers, outputs a list of shared ciphers between client and server not respecting what |
Can you be more specific about your application scenario? |
A common usecase here is probably to check if client supports EDCSA ciphers, and serve certs accordingly. Splitting/iterating/garbage collecting colon-separated strings here is less effective than returning uint32_t[] Also, only the enabled ciphers (SSL_get1_supported_ciphers/SSL_get_client_ciphers) is more useful than also needing to know |
Would you please submit a PR? |
Yes, I can do that. |
Here is the RFC pull request: #1962 |
I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.