diff --git a/servers/slurpd/main.c b/servers/slurpd/main.c index a7ede8959c..17a6ab717c 100644 --- a/servers/slurpd/main.c +++ b/servers/slurpd/main.c @@ -48,13 +48,6 @@ main( /* initialize thread package */ ldap_pvt_thread_initialize(); -#ifdef HAVE_TLS - if( ldap_pvt_tls_init() || ldap_pvt_tls_init_def_ctx() ) { - fprintf( stderr, "TLS Initialization failed.\n" ); - exit( EXIT_FAILURE); - } -#endif - /* * Create and initialize globals. init_globals() also initializes * the main replication queue. @@ -81,6 +74,13 @@ main( exit( EXIT_FAILURE ); } +#ifdef HAVE_TLS + if( ldap_pvt_tls_init() || ldap_pvt_tls_init_def_ctx() ) { + fprintf( stderr, "TLS Initialization failed.\n" ); + exit( EXIT_FAILURE); + } +#endif + /* * Make sure our directory exists */