Hello!
On Fri, Apr 29, 2016 at 2:14 AM, 杨阳 wrote:
> when the create_ocsp_request failed, if I not return ngx.exit(ngx.ERROR) and just use return, I find it will not just throw out
>
> "ssl handshake: userdata" but "
> failed to do SSL handshake: handshake failed
> "
>
> [crit] 2557#0: *3 SSL_shutdown() failed (SSL: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init) while SSL handshaking, client: unix:, server: unix:/home/vagrant/marco/nginx/app/t/servroot/html/nginx.sock at /home/vagrant/test-nginx/lib/Test/Nginx/Socket.pm line 1192.
>
>
> BTW, I use the latest openresty-1.9.7.4's compile nginx(with openssl 1.0.2g), and I wonder why it can't finish the handshake, and in other test case, if it just return nil and it can finish the handshake.
>
This is by design. "ngx.exit(ngx.ERROR)" *is* the way to abort the
handshake forcibly while plain "return" just quits the current Lua
handler. BTW, the return value of the "return" statement on the
top-level of the Lua handler is always ignored according to the
current implementation.
Regards,
-agentzh