diff --git a/src/ngx_http_lua_ssl_certby.c b/src/ngx_http_lua_ssl_certby.c index 9a2d63fcf0..32e83e51b0 100644 --- a/src/ngx_http_lua_ssl_certby.c +++ b/src/ngx_http_lua_ssl_certby.c @@ -201,7 +201,6 @@ ngx_http_lua_ssl_cert_handler(ngx_ssl_conn_t *ssl_conn, void *data) ngx_http_lua_srv_conf_t *lscf; ngx_http_core_loc_conf_t *clcf; ngx_http_lua_ssl_ctx_t *cctx; - ngx_http_core_srv_conf_t *cscf; c = ngx_ssl_get_connection(ssl_conn); @@ -299,16 +298,6 @@ ngx_http_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) { - cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); - - ngx_log_error(NGX_LOG_ALERT, c->log, 0, - "no ssl_certificate_by_lua* defined in " - "server %V", &cscf->server_name); - - goto failed; - } - rc = lscf->srv.ssl_cert_handler(r, lscf, L); if (rc >= NGX_OK || rc == NGX_ERROR) { diff --git a/src/ngx_http_lua_ssl_client_helloby.c b/src/ngx_http_lua_ssl_client_helloby.c index 42a91c1604..cc3ed91c36 100644 --- a/src/ngx_http_lua_ssl_client_helloby.c +++ b/src/ngx_http_lua_ssl_client_helloby.c @@ -191,7 +191,6 @@ ngx_http_lua_ssl_client_hello_handler(ngx_ssl_conn_t *ssl_conn, ngx_http_lua_srv_conf_t *lscf; ngx_http_core_loc_conf_t *clcf; ngx_http_lua_ssl_ctx_t *cctx; - ngx_http_core_srv_conf_t *cscf; c = ngx_ssl_get_connection(ssl_conn); @@ -290,16 +289,6 @@ ngx_http_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) { - cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); - - ngx_log_error(NGX_LOG_ALERT, c->log, 0, - "no ssl_client_hello_by_lua* defined in " - "server %V", &cscf->server_name); - - goto failed; - } - rc = lscf->srv.ssl_client_hello_handler(r, lscf, L); if (rc >= NGX_OK || rc == NGX_ERROR) {