Commit e330467
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 because the failure happens before
the real handshake. 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 e330467
1 file changed
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
434 | | - | |
435 | 433 | | |
436 | 434 | | |
437 | 435 | | |
| |||
0 commit comments