diff --git a/src/ngx_stream_lua_socket_tcp.c b/src/ngx_stream_lua_socket_tcp.c index cd26b2c2..f8e9dd85 100644 --- a/src/ngx_stream_lua_socket_tcp.c +++ b/src/ngx_stream_lua_socket_tcp.c @@ -1793,8 +1793,12 @@ ngx_stream_lua_socket_tcp_sslhandshake(lua_State *L) if (n >= 5) { if (lua_toboolean(L, 5)) { #ifdef NGX_STREAM_LUA_USE_OCSP - SSL_set_tlsext_status_type(c->ssl->connection, - TLSEXT_STATUSTYPE_ocsp); + if (SSL_set_tlsext_status_type(c->ssl->connection, + TLSEXT_STATUSTYPE_ocsp) != 1) + { + return luaL_error(L, + "failed to enable OCSP stapling"); + } #else return luaL_error(L, "no OCSP support"); #endif