diff --git a/src/ngx_stream_lua_socket_tcp.c b/src/ngx_stream_lua_socket_tcp.c index 2cddfd9c..396e3080 100644 --- a/src/ngx_stream_lua_socket_tcp.c +++ b/src/ngx_stream_lua_socket_tcp.c @@ -1792,8 +1792,10 @@ 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