Commit 9a07206
committed
bugfix: remove sslhandshake result assert for pre-handshake errors.
When `tcpsock:sslhandshake()` fails before the actual SSL handshake starts,
`ngx_http_lua_ffi_socket_tcp_get_sslhandshake_result()` may return `FFI_OK`
while still providing the OpenSSL error details.
One example is a client private key setup failure. In that path, `rc` is
`FFI_ERROR`, but `u->error_ret` is not set,
so `ngx_http_lua_ffi_socket_tcp_get_sslhandshake_result` would return `FFI_OK`.
The existing `assert(res == FFI_ERROR)` turns this expected
error-reporting path into an assertion failure.
This patch removes the assertion so Lua can return the original SSL error to
the caller.1 parent 90fb633 commit 9a07206
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
434 | | - | |
435 | 433 | | |
436 | 434 | | |
437 | 435 | | |
| |||
0 commit comments