Skip to content

bugfix: sslhandshake read error details on immediate FFI_ERROR#533

Merged
zhuizhuhaomeng merged 1 commit into
openresty:masterfrom
tzssangglass:fix-sslhandshake-immediate-result-way2
Jun 5, 2026
Merged

bugfix: sslhandshake read error details on immediate FFI_ERROR#533
zhuizhuhaomeng merged 1 commit into
openresty:masterfrom
tzssangglass:fix-sslhandshake-immediate-result-way2

Conversation

@tzssangglass
Copy link
Copy Markdown
Contributor

With the C side now returning FFI_ERROR instead of FFI_OK when u->error_ret is set after an immediate handshake, the early FFI_OK path is removed. Added get_sslhandshake_result() in the FFI_ERROR branch so errmsg and openssl_error_code are populated when the error comes from the first call rather than from an async resume.

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-resty-core project.

With the C side now returning FFI_ERROR instead of FFI_OK when
u->error_ret is set after an immediate handshake, the early FFI_OK
path is removed.  Added get_sslhandshake_result() in the FFI_ERROR
branch so errmsg and openssl_error_code are populated when the
error comes from the first call rather than from an async resume.
@tzssangglass tzssangglass force-pushed the fix-sslhandshake-immediate-result-way2 branch from d62acdc to e74ede1 Compare June 3, 2026 14:43
@tzssangglass
Copy link
Copy Markdown
Contributor Author

Hi @zhuizhuhaomeng, this is the sister of openresty/lua-nginx-module#2506, since openresty/lua-nginx-module#2506 has been merged, this PR should also be merged.

@zhuizhuhaomeng zhuizhuhaomeng merged commit 1c5796e into openresty:master Jun 5, 2026
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants