feature: ngx_http_lua_ffi_ssl_ciphers #2424
Open
+291
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SSL Cipher Enumeration API Enhancement for lua-nginx-module
📝 Summary
This PR enhances the SSL cipher enumeration functionality in the lua-nginx-module by improving the
ngx_http_lua_ffi_ssl_ciphers()
function and expanding its test coverage. The main focus is on debugging SSL cipher negotiation issues and ensuring proper cipher matching between server-supported and client-provided cipher suites.Key Changes:
ngx_http_lua_ffi_ssl_ciphers()
function inngx_http_lua_ssl_certby.c
to provide better cipher enumeration and matching logic🔗 Related Issues
Closed #1962
🧪 Testing
Main Test Cases Added/Enhanced:
TEST 15: Get supported ciphers
ECDHE-RSA-AES128-GCM-SHA256
,ECDHE-ECDSA-AES128-GCM-SHA256
,ECDHE-ECDSA-AES256-GCM-SHA384
["c02f","c02b"]
containing hex cipher IDs of matched ciphersTEST 16: SSL cipher API error handling (no SSL)
TEST 17: Buffer overflow handling
["c02f"]
demonstrating proper buffer managementTEST 18: BoringSSL error handling
Testing Methodology:
📝 Additional Notes
Technical Implementation Details:
ngx_http_lua_ffi_ssl_ciphers()
function now properly handles cipher protocol ID (tp
) matching between server-supported ciphers (viaSSL_get1_supported_ciphers()
) and client ciphers (viaSSL_get_client_ciphers()
)Build Configuration Changes:
util/mirror-tarballs
script to use local lua-nginx-module development version via symbolic link📋 Checklist
📘 Deployment Notes
Prerequisites:
Configuration Considerations:
🔍 Test Results
SSL Cipher Enumeration Test Summary:
Performance Impact:
Compatibility Matrix:
The implementation maintains backward compatibility while providing enhanced debugging capabilities for SSL cipher negotiation troubleshooting.