Skip to content

Commit 581d966

Browse files
Adding error checking
1 parent 9c205ed commit 581d966

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ngx_stream_lua_socket_tcp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,8 +1792,10 @@ ngx_stream_lua_socket_tcp_sslhandshake(lua_State *L)
17921792
if (n >= 5) {
17931793
if (lua_toboolean(L, 5)) {
17941794
#ifdef NGX_STREAM_LUA_USE_OCSP
1795-
SSL_set_tlsext_status_type(c->ssl->connection,
1796-
TLSEXT_STATUSTYPE_ocsp);
1795+
if (SSL_set_tlsext_status_type(c->ssl->connection,
1796+
TLSEXT_STATUSTYPE_ocsp) != 1) {
1797+
return luaL_error(L, "failed to enable OCSP stapling");
1798+
}
17971799
#else
17981800
return luaL_error(L, "no OCSP support");
17991801
#endif

0 commit comments

Comments
 (0)