]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix compiling with --disable-crypto and/or --disable-ssl
authorDavid Sommerseth <davids@redhat.com>
Wed, 14 Dec 2011 17:12:23 +0000 (18:12 +0100)
committerDavid Sommerseth <davids@redhat.com>
Thu, 15 Dec 2011 10:34:48 +0000 (11:34 +0100)
The checks introduced in commit 0f2bc0dd92f43c91e33bba8a66b06b98f281efc1
didn't properly remove checks if crypto or SSL was disabled at compile time.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
options.c

index 27193ff672694e109421a0c80755e3c7354a5211..736495e48102eb36305125a52240ac890cfe1815 100644 (file)
--- a/options.c
+++ b/options.c
@@ -2691,10 +2691,11 @@ options_postprocess_filechecks (struct options *options)
   errs |= check_file_access (CHKACC_FILE, options->management_user_pass, R_OK,
                              "--management user/password file");
 #endif /* ENABLE_MANAGEMENT */
+#if P2MP
   if( options->auth_user_pass_file && strcmp(options->auth_user_pass_file, "stdin") != 0 )
     errs |= check_file_access (CHKACC_FILE, options->auth_user_pass_file, R_OK,
                                "--auth-user-pass");
-
+#endif /* P2MP */
 
   /* ** System related ** */
   errs |= check_file_access (CHKACC_FILE, options->chroot_dir,
@@ -2709,15 +2710,14 @@ options_postprocess_filechecks (struct options *options)
                              R_OK|W_OK, "--status");
 
   /* ** Config related ** */
-#ifdef USE_CRYPTO
+#ifdef USE_SSL
   errs |= check_file_access (CHKACC_FILE, options->tls_export_cert,
                              R_OK|W_OK|X_OK, "--tls-export-cert");
-#endif /* USE_CRYPTO */
+#endif /* USE_SSL */
+#if P2MP_SERVER
   errs |= check_file_access (CHKACC_FILE, options->client_config_dir,
                              R_OK|X_OK, "--client-config-dir");
-
   /* ** Script hooks ** */
-#if P2MP_SERVER
   errs |= check_file_access (CHKACC_FILE, options->client_connect_script,
                              R_OK|X_OK, "--client-connect script");
   errs |= check_file_access (CHKACC_FILE, options->client_disconnect_script,