From c723a7e6cef94fbbb6ef3aacca92717600937f6b Mon Sep 17 00:00:00 2001 From: willmafh Date: Mon, 22 Sep 2025 12:55:31 +0800 Subject: [PATCH] chore: delete unnecessary checking codes. --- src/ngx_stream_lua_ssl_certby.c | 9 --------- src/ngx_stream_lua_ssl_client_helloby.c | 9 --------- 2 files changed, 18 deletions(-) diff --git a/src/ngx_stream_lua_ssl_certby.c b/src/ngx_stream_lua_ssl_certby.c index bce1716b..862e43d1 100644 --- a/src/ngx_stream_lua_ssl_certby.c +++ b/src/ngx_stream_lua_ssl_certby.c @@ -309,15 +309,6 @@ ngx_stream_lua_ssl_cert_handler(ngx_ssl_conn_t *ssl_conn, void *data) c->log->action = "loading SSL certificate by lua"; - if (lscf->srv.ssl_cert_handler == NULL) { - - ngx_log_error(NGX_LOG_ALERT, c->log, 0, - "no ssl_certificate_by_lua* defined in " - "server %s:%ui", &cscf->file_name, &cscf->line); - - goto failed; - } - rc = lscf->srv.ssl_cert_handler(r, lscf, L); if (rc >= NGX_OK || rc == NGX_ERROR) { diff --git a/src/ngx_stream_lua_ssl_client_helloby.c b/src/ngx_stream_lua_ssl_client_helloby.c index 9e738ac2..9b19cf18 100644 --- a/src/ngx_stream_lua_ssl_client_helloby.c +++ b/src/ngx_stream_lua_ssl_client_helloby.c @@ -292,15 +292,6 @@ ngx_stream_lua_ssl_client_hello_handler(ngx_ssl_conn_t *ssl_conn, c->log->action = "loading SSL client hello by lua"; - if (lscf->srv.ssl_client_hello_handler == NULL) { - - ngx_log_error(NGX_LOG_ALERT, c->log, 0, - "no ssl_client_hello_by_lua* defined in " - "server %s:%ui", &cscf->file_name, &cscf->line); - - goto failed; - } - rc = lscf->srv.ssl_client_hello_handler(r, lscf, L); if (rc >= NGX_OK || rc == NGX_ERROR) {