Browse code

Fix builds with --disable-crypto

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>

David Sommerseth authored on 2016/11/01 08:07:09
Showing 2 changed files
... ...
@@ -869,10 +869,11 @@ init_options (struct options *o, const bool init_gc)
869 869
 #ifdef ENABLE_PKCS11
870 870
   o->pkcs11_pin_cache_period = -1;
871 871
 #endif			/* ENABLE_PKCS11 */
872
-  o->auth_token_generate = false;
873 872
 
874
-/* tmp is only used in P2MP server context */
873
+/* P2MP server context features */
875 874
 #if P2MP_SERVER
875
+  o->auth_token_generate = false;
876
+
876 877
   /* Set default --tmp-dir */
877 878
 #ifdef WIN32
878 879
   /* On Windows, find temp dir via enviroment variables */
... ...
@@ -124,6 +124,8 @@ int tls_version_parse(const char *vstr, const char *extra);
124 124
  */
125 125
 int tls_version_max(void);
126 126
 
127
+#ifdef ENABLE_CRYPTO
128
+
127 129
 /**
128 130
  * Initialise a library-specific TLS context for a server.
129 131
  *
... ...
@@ -510,4 +512,5 @@ void get_highest_preference_tls_cipher (char *buf, int size);
510 510
  */
511 511
 const char * get_ssl_library_version(void);
512 512
 
513
+#endif /* ENABLE_CRYPTO */
513 514
 #endif /* SSL_BACKEND_H_ */