Repository navigation
Conversation
BoringSSL always reports OPENSSL_VERSION_NUMBER as 1.1.1, so the version check left HAVE_SSL_KEY_LOG undefined and the directive was accepted but silently ignored, although BoringSSL has long provided SSL_CTX_set_keylog_callback(). The lua_ssl_key_log test now checks the secrets of the last handshake only, in sorted order: the key log file is appended to on every request, and BoringSSL logs the secrets in a different order than OpenSSL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I hereby granted the copyright of the changes in this pull request
to the authors of this stream-lua-nginx-module project.
This is the stream subsystem counterpart of openresty/lua-nginx-module#2543 (the
lua_ssl_key_logpart).BoringSSL always reports
OPENSSL_VERSION_NUMBERas 1.1.1, so the> 1.1.1jcheck leftHAVE_SSL_KEY_LOGundefined.lua_ssl_key_logwas accepted but silently did nothing. BoringSSL has providedSSL_CTX_set_keylog_callback()for a long time, including the boringssl-20230902 build used by lua-nginx-module's CI.The
lua_ssl_key_logtest int/129-ssl-socket.tmatched the secrets in the order OpenSSL writes them. BoringSSL writes them in a different order, and the key log file is appended to on every repeated request. The test now keeps the lines of the last handshake (by client random) and sorts them before matching.Testing
On Ubuntu 22.04 (aarch64), nginx 1.31.8 built with
util/build.sh:6ca49385and current BoringSSL main, TEST 37 (lua_ssl_key_log directive) now passes. To get that far with BoringSSL, nginx also needs bugfix: lua_ssl_verify_depth and lua_ssl_certificate* were not initialized without proxy SSL support. #416; otherwiselua_ssl_verify_depthstops nginx from starting.t/129-ssl-socket.tand the other SSL test files pass.CI on master currently fails to build
ngx_stream_lua_shdict.c(since 68949e1); this branch is based on 9bc2e1f, the last green commit.Related: openresty/openresty#1159.
🤖 Generated with Claude Code