From: David Sommerseth Date: Mon, 31 Oct 2016 23:07:09 +0000 (+0100) Subject: Fix builds with --disable-crypto X-Git-Tag: v2.4_beta1~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51d4d1543a64158cc24f176a8d45e51cbda8cd91;p=thirdparty%2Fopenvpn.git 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 Acked-by: Gert Doering 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 --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index f88e94d8f..be31ed379 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -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 */ diff --git a/src/openvpn/ssl_backend.h b/src/openvpn/ssl_backend.h index 542c373d6..a61f03a7c 100644 --- a/src/openvpn/ssl_backend.h +++ b/src/openvpn/ssl_backend.h @@ -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_ */