]> git.sur5r.net Git - openldap/commitdiff
ITS#1613, call ldap_pvt_tls_init after config file is read. ldap.conf doesn't
authorHoward Chu <hyc@openldap.org>
Thu, 11 Apr 2002 07:04:12 +0000 (07:04 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 11 Apr 2002 07:04:12 +0000 (07:04 +0000)
get read until much later, too late for TLS_RANDFILE to be useful.

servers/slurpd/main.c

index a7ede8959c87d8703c9440ee28c3a8d0d7fd47d6..17a6ab717cd1aa5f8ef53b52fa0a7da7be4f9454 100644 (file)
@@ -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
      */