@@ -216,10 +216,12 @@ ngx_uint_t ngx_dump_config;
216216static ngx_uint_t ngx_show_help ;
217217static ngx_uint_t ngx_show_version ;
218218static ngx_uint_t ngx_show_configure ;
219+ #if (NGX_SSL && NGX_SSL_ASYNC )
219220/* indicate that nginx start without ngx_ssl_init()
220221 * which will involve OpenSSL configuration file to
221222 * start OpenSSL engine */
222223static ngx_uint_t ngx_no_ssl_init ;
224+ #endif
223225static u_char * ngx_prefix ;
224226static u_char * ngx_conf_file ;
225227static u_char * ngx_conf_params ;
@@ -320,8 +322,13 @@ main(int argc, char *const *argv)
320322
321323 /* STUB */
322324#if (NGX_OPENSSL )
323- if (!ngx_no_ssl_init )
325+ #if (NGX_SSL && NGX_SSL_ASYNC )
326+ if (!ngx_no_ssl_init ) {
327+ #endif
324328 ngx_ssl_init (log );
329+ #if (NGX_SSL && NGX_SSL_ASYNC )
330+ }
331+ #endif
325332#endif
326333
327334 /*
@@ -331,7 +338,9 @@ main(int argc, char *const *argv)
331338
332339 ngx_memzero (& init_cycle , sizeof (ngx_cycle_t ));
333340 init_cycle .log = log ;
341+ #if (NGX_SSL && NGX_SSL_ASYNC )
334342 init_cycle .no_ssl_init = ngx_no_ssl_init ;
343+ #endif
335344 ngx_cycle = & init_cycle ;
336345
337346 init_cycle .pool = ngx_create_pool (1024 , log );
@@ -764,12 +773,16 @@ ngx_get_options(int argc, char *const *argv)
764773
765774 case 't' :
766775 ngx_test_config = 1 ;
776+ #if (NGX_SSL && NGX_SSL_ASYNC )
767777 ngx_no_ssl_init = 1 ;
778+ #endif
768779 break ;
769780
770781 case 'd' :
771782 ngx_dump_config = 1 ;
783+ #if (NGX_SSL && NGX_SSL_ASYNC )
772784 ngx_no_ssl_init = 1 ;
785+ #endif
773786 break ;
774787
775788 case 'q' :
@@ -819,6 +832,9 @@ ngx_get_options(int argc, char *const *argv)
819832 return NGX_ERROR ;
820833
821834 case 's' :
835+ #if (NGX_SSL && NGX_SSL_ASYNC )
836+ ngx_no_ssl_init = 1 ;
837+ #endif
822838 if (* p ) {
823839 ngx_signal = (char * ) p ;
824840
@@ -849,7 +865,9 @@ ngx_get_options(int argc, char *const *argv)
849865
850866 default :
851867 ngx_log_stderr (0 , "invalid option: \"%c\"" , * (p - 1 ));
868+ #if (NGX_SSL && NGX_SSL_ASYNC )
852869 ngx_no_ssl_init = 1 ;
870+ #endif
853871 return NGX_ERROR ;
854872 }
855873 }
0 commit comments