]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix builds with --disable-crypto
authorDavid Sommerseth <davids@openvpn.net>
Mon, 31 Oct 2016 23:07:09 +0000 (00:07 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 1 Nov 2016 08:24:19 +0000 (09:24 +0100)
When building with --disable-crypto the P2MP_SERVER is not defined,
thus breaking one place where the struct options auth_token_generate
was provided with a default value.

Also remove a lot of compiler warnings from ssl_backend.h due to
various undefined structs when doing the same build type.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1477955229-20164-1-git-send-email-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12857.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c
src/openvpn/ssl_backend.h

index f88e94d8f1fd697d16261be02d9a128710fd52e4..be31ed3792ca7f82883361c7c0e0d283260e8850 100644 (file)
@@ -869,10 +869,11 @@ init_options (struct options *o, const bool init_gc)
 #ifdef ENABLE_PKCS11
   o->pkcs11_pin_cache_period = -1;
 #endif                 /* ENABLE_PKCS11 */
-  o->auth_token_generate = false;
 
-/* tmp is only used in P2MP server context */
+/* P2MP server context features */
 #if P2MP_SERVER
+  o->auth_token_generate = false;
+
   /* Set default --tmp-dir */
 #ifdef WIN32
   /* On Windows, find temp dir via enviroment variables */
index 542c373d6f4f1e5c35e97b5036045d007043d46c..a61f03a7cbae9deade0d83ff6ce0dcbabbdd1b26 100644 (file)
@@ -124,6 +124,8 @@ int tls_version_parse(const char *vstr, const char *extra);
  */
 int tls_version_max(void);
 
+#ifdef ENABLE_CRYPTO
+
 /**
  * Initialise a library-specific TLS context for a server.
  *
@@ -510,4 +512,5 @@ void get_highest_preference_tls_cipher (char *buf, int size);
  */
 const char * get_ssl_library_version(void);
 
+#endif /* ENABLE_CRYPTO */
 #endif /* SSL_BACKEND_H_ */