build revolution
Re: [Openvpn-devel] [PATCH 33/35] build: proper crypto detection and usage
In reply to Alon Bar-LevI need to delve into this one a little further once I have time. At first glance, a minor nack: OpenSSL 0.9.6 isn't supported anymore, so the autoconf statement and any >= 0.9.7 statements can go.
Adriaan
Quoted 2,898 lines
-----Original Message-----
From: Alon Bar-Lev [mailto:[email protected]...]
Sent: dinsdag 21 februari 2012 2:23
To: [email protected]
Cc: Alon Bar-Lev
Subject: [Openvpn-devel] [PATCH 33/35] build: proper crypto detection and usageSigned-off-by Alon Bar-Lev <[email protected]...>--- configure.ac | 224 ++++++++++++++++++----------- -------- doc/doxygen/doc_data_crypto.h | 2 +- include/openvpn-plugin.h | 31 ++++-- src/openvpn/Makefile.am | 2 + src/openvpn/crypto.c | 10 +- src/openvpn/crypto.h | 8 +- src/openvpn/crypto_backend.h | 4 +- src/openvpn/crypto_openssl.c | 26 +--- src/openvpn/crypto_polarssl.c | 4 +- src/openvpn/error.c | 8 +- src/openvpn/error.h | 2 +- src/openvpn/forward-inline.h | 6 +- src/openvpn/forward.c | 24 ++-- src/openvpn/init.c | 84 +++++++------- src/openvpn/manage.c | 4 +- src/openvpn/misc.c | 2 +- src/openvpn/misc.h | 6 +- src/openvpn/openvpn.h | 26 ++-- src/openvpn/options.c | 140 ++++++++++++------------ src/openvpn/options.h | 14 +- src/openvpn/packet_id.c | 4 +- src/openvpn/packet_id.h | 4 +- src/openvpn/pkcs11_openssl.c | 2 +- src/openvpn/pkcs11_polarssl.c | 4 +- src/openvpn/plugin.c | 12 +- src/openvpn/plugin.h | 14 +- src/openvpn/reliable.c | 4 +- src/openvpn/reliable.h | 4 +- src/openvpn/session_id.c | 4 +- src/openvpn/session_id.h | 4 +- src/openvpn/ssl.c | 6 +- src/openvpn/ssl.h | 4 +- src/openvpn/ssl_backend.h | 10 +- src/openvpn/ssl_openssl.c | 8 +- src/openvpn/ssl_polarssl.c | 10 +- src/openvpn/ssl_verify.c | 22 ++-- src/openvpn/ssl_verify.h | 4 +- src/openvpn/ssl_verify_backend.h | 26 ++-- src/openvpn/ssl_verify_openssl.c | 10 +- src/openvpn/ssl_verify_openssl.h | 6 +- src/openvpn/ssl_verify_polarssl.c | 6 +- src/openvpn/ssl_verify_polarssl.h | 5 +- src/openvpn/syshead.h | 14 +- src/plugins/examples/log_v3.c | 4 +- 44 files changed, 408 insertions(+), 410 deletions(-)configure.ac +0
-13@@ -227,19 +227,6 @@ AC_ARG_ENABLE( ) AC_ARG_WITH( - [ssl-headers], - [AS_HELP_STRING([--with-ssl-headers=DIR], [Crypto/SSL Include files location])], - [CS_HDR_DIR="$withval"] - [CPPFLAGS="$CPPFLAGS -I$withval"] -) - -AC_ARG_WITH( - [ssl-lib], - [AS_HELP_STRING([--with-ssl-lib=DIR], [Crypto/SSL Library location])], - [LDFLAGS="$LDFLAGS -L$withval"] -) - -AC_ARG_WITH( [mem-check],[AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory
checking, TYPE=dmalloc|valgrind|ssl])],,configure.ac +4
-4@@ -247,15 +234,15 @@ AC_ARG_WITH( ) AC_ARG_WITH( - [ssl-type], - [AS_HELP_STRING([--with-ssl-type=TYPE], [build with the given SSL library, TYPE = openssl or polarssl])], + [crypto-library], + [AS_HELP_STRING([--with-crypto-library=library], [build with the given crypto library, TYPE=openssl|polarssl @<:@default=openssl@:>@])], [ case "${withval}" in openssl|polarssl) ;; - *) AC_MSG_ERROR([bad value ${withval} for --with-ssl- type]) ;; + *) AC_MSG_ERROR([bad value ${withval} for --with- crypto-library]) ;; esac ], - [with_ssl_type="openssl"] + [with_crypto_library="openssl"] ) AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${host}", [A string representing ourhost])
configure.ac +67
-98@@ -637,6 +624,72 @@ case "${with_mem_check}" in ;; esac +have_openssl_crypto="yes" +PKG_CHECK_MODULES( + [OPENSSL_CRYPTO], + [libcrypto >= 0.9.6], + , + [AC_CHECK_LIB( + [crypto], + [RSA_new], + [OPENSSL_CRYPTO_LIBS="-lcrypto"], + [have_openssl_crypto="no"] + )] +) +have_openssl_ssl="yes" +PKG_CHECK_MODULES( + [OPENSSL_SSL], + [libssl >= 0.9.6], + , + [AC_CHECK_LIB( + [ssl], + [SSL_CTX_new], + [OPENSSL_SSL_LIBS="-lssl"], + [have_openssl_ssl="no"] + )] +) +if test "${have_openssl_crypto}" = "yes"; then + saved_CFLAGS="${CFLAGS}" + saved_LIBS="${LIBS}" + CFLAGS="${CFLAGS} ${OPENSSL_CRYPTO_CFLAGS}" + LIBS="${LIBS} ${OPENSSL_CRYPTO_LIBS}" + AC_CHECK_FUNCS([EVP_CIPHER_CTX_set_key_length]) + have_openssl_engine="yes" + AC_CHECK_FUNCS( + [ \ + ENGINE_load_builtin_engines \ + ENGINE_register_all_complete \ + ENGINE_cleanup \ + ], + , + [have_openssl_engine="no"; break] + ) + + CFLAGS="${saved_CFLAGS}" + LIBS="${saved_LIBS}" +fi + +AC_ARG_VAR([POLARSSL_CFLAGS], [C compiler flags for polarssl]) +AC_ARG_VAR([POLARSSL_LIBS], [linker flags for polarssl]) +have_polarssl_ssl="yes" +have_polarssl_crypto="yes" +if test -z "${POLARSSL_LIBS}"; then + AC_CHECK_LIB( + [polarssl], + [ssl_init], + [POLARSSL_LIBS="-lpolarssl"], + [ + have_polarssl_ssl="no" + AC_CHECK_LIB( + [polarssl], + [aes_crypt_cbc], + , + [have_polarssl_crypto="no"] + ) + ] + ) +fi + AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo]) AC_ARG_VAR([LZO_LIBS], [linker flags for lzo]) have_lzo="yes"@@ -683,106 +736,9 @@ PKG_CHECK_MODULES( [have_pkcs11_helper="yes"] ) -dnl -dnl check for SSL-crypto library -dnl -if test "${enable_crypto}" = "yes"; then - if test "${with_ssl_type}" = "openssl"; then - AC_CHECKING([for OpenSSL Crypto Library and Header files]) - AC_CHECK_HEADER(openssl/evp.h,, - [AC_MSG_ERROR([OpenSSL Crypto headers not found.])]) - - for lib in crypto eay32; do - AC_CHECK_LIB($lib, EVP_CIPHER_CTX_init, - [ - cryptofound=1 - LIBS="${LIBS} -l$lib" - ] - ) - done - test -n "$cryptofound" || AC_MSG_ERROR([OpenSSL Crypto library not found.]) - - AC_MSG_CHECKING([that OpenSSL Library is at least version 0.9.6]) - AC_EGREP_CPP(yes, - [ - #include <openssl/evp.h> - #if SSLEAY_VERSION_NUMBER >= 0x00906000L - yes - #endif - ], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE(USE_CRYPTO, 1, [Use crypto library]) - AC_DEFINE(USE_OPENSSL, 1, [Use OpenSSL library]) - AC_CHECK_FUNCS(EVP_CIPHER_CTX_set_key_length) - - dnl check for OpenSSL crypto acceleration capability - AC_CHECK_HEADERS(openssl/engine.h) - AC_CHECK_FUNCS(ENGINE_load_builtin_engines) - AC_CHECK_FUNCS(ENGINE_register_all_complete) - AC_CHECK_FUNCS(ENGINE_cleanup) - ], - [AC_MSG_ERROR([OpenSSL crypto Library is too old.])] - ) - fi - if test "${with_ssl_type}" = "polarssl"; then - AC_CHECKING([for PolarSSL Crypto Library and Header files]) - AC_CHECK_HEADER(polarssl/aes.h, - [AC_CHECK_LIB(polarssl, aes_crypt_cbc, - [ - LIBS="${LIBS} -lpolarssl" - AC_DEFINE(USE_CRYPTO, 1, [Use crypto library]) - AC_DEFINE(USE_POLARSSL, 1, [Use PolarSSL library]) - ], - [AC_MSG_ERROR([PolarSSL Crypto library not found.])] - )], - [AC_MSG_ERROR([PolarSSL Crypto headers not found.])] - ) - fi - dnl - dnl check for OpenSSL-SSL library - dnl - - if test "${enable_ssl}" = "yes"; then - if test "${with_ssl_type}" = "openssl"; then - AC_CHECKING([for OpenSSL SSL Library and Header files]) - AC_CHECK_HEADER(openssl/ssl.h,, - [AC_MSG_ERROR([OpenSSL SSL headers not found.])] - ) - - for lib in ssl ssl32; do - AC_CHECK_LIB($lib, SSL_CTX_new, - [ - sslfound=1 - LIBS="${LIBS} -l$lib" - ] - ) - done - - test -n "${sslfound}" || AC_MSG_ERROR([OpenSSL SSL library not found.]) - - AC_DEFINE(USE_SSL, 1, [Use OpenSSL SSL library]) - fi - if test "${with_ssl_type}" = "polarssl"; then - AC_CHECKING([for PolarSSL SSL Library and Header files]) - AC_CHECK_HEADER(polarssl/ssl.h, - [AC_CHECK_LIB(polarssl, ssl_init, - [ - LIBS="${LIBS} -lpolarssl" - AC_DEFINE(USE_SSL, 1, [Use SSL library]) - AC_DEFINE(USE_POLARSSL, 1, [Use PolarSSL library]) - ], - [AC_MSG_ERROR([PolarSSL SSL library not found.])] - )], - [AC_MSG_ERROR([PolarSSL SSL headers not found.])] - ) - fi - fi -fi - dnl enable --x509-username-field feature if requested if test "${enable_x509_alt_username}" = "yes"; then - if test "${with_ssl_type}" = "polarssl" ; then + if test "${with_crypto_library}" = "polarssl" ; thenAC_MSG_ERROR([PolarSSL does not support the --x509-username-field feature])
ficonfigure.ac +0
-0@@ -806,6 +762,42 @@ test "${enable_strict_options}" = "yes" &&AC_DEFINE([ENABLE_STRICT_OPTIONS_CHEC
test "${enable_password_save}" = "yes" &&
AC_DEFINE([ENABLE_PASSWORD_SAVE], [1], [Allow --askpass and --auth- user-pass passwords to be read from a file])
test "${enable_systemd}" = "yes" && AC_DEFINE([ENABLE_SYSTEMD], [1],
[Enable systemd support])configure.ac +9
-0+case "${with_crypto_library}" in + openssl) + have_crypto_crypto="${have_openssl_crypto}" + have_crypto_ssl="${have_openssl_ssl}" + CRYPTO_CRYPTO_CFLAGS="${OPENSSL_CRYPTO_CFLAGS}" + CRYPTO_CRYPTO_LIBS="${OPENSSL_CRYPTO_LIBS}" + CRYPTO_SSL_CFLAGS="${OPENSSL_SSL_CFLAGS}" + CRYPTO_SSL_LIBS="${OPENSSL_SSL_LIBS}" + AC_DEFINE([ENABLE_CRYPTO_OPENSSL], [1], [Use OpenSSLlibrary])
+ test "${have_openssl_engine}" = "yes" &&AC_DEFINE([HAVE_OPENSSL_ENGINE], [1], [Use crypto library])configure.ac +7
-0+ ;; + polarssl) + have_crypto_crypto="${have_polarssl_crypto}" + have_crypto_ssl="${have_polarssl_ssl}" + CRYPTO_CRYPTO_CFLAGS="${POLARSSL_CRYPTO_CFLAGS}" + CRYPTO_CRYPTO_LIBS="${POLARSSL_LIBS}" + AC_DEFINE([ENABLE_CRYPTO_POLARSSL], [1], [Use PolarSSLlibrary])
configure.ac +5
-0+ ;; +esac + +if test "${enable_crypto}" = "yes"; then + test "${have_crypto_crypto}" != "yes" &&
AC_MSG_ERROR([${with_crypto_library} crytpo is required but missing])
+ OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS}
${CRYPTO_CRYPTO_CFLAGS}"
+ OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS}
${CRYPTO_CRYPTO_LIBS}"configure.ac +6
-0+ AC_DEFINE([ENABLE_CRYPTO], [1], [Enable crypto library]) +fi + + +if test "${enable_ssl}" = "yes"; then + test "${enable_crypto}" != "yes" && AC_MSG_ERROR([crypto must beenabled for ssl])
+ test "${have_crypto_ssl}" != "yes" &&AC_MSG_ERROR([${with_ssl_library} ssl is required but missing])
+ OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS}
${CRYPTO_SSL_CFLAGS}"configure.ac +4
-0+ OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_SSL_LIBS}" + AC_DEFINE([ENABLE_SSL], [1], [Enable ssl library]) +fi + if test "${enable_plugins}" = "yes"; then test "${WIN32}" != "yes" -a -z "${DL_LIBS}" &&
AC_MSG_ERROR([libdl is required for plugins])OPTIONAL_DL_LIBS="${DL_LIBS}"configure.ac +2
-0@@ -876,6 +868,8 @@ AC_SUBST([TAP_WIN_MIN_MINOR]) AC_SUBST([OPTIONAL_DL_LIBS]) AC_SUBST([OPTIONAL_SELINUX_LIBS]) +AC_SUBST([OPTIONAL_CRYPTO_CFLAGS]) +AC_SUBST([OPTIONAL_CRYPTO_LIBS]) AC_SUBST([OPTIONAL_LZO_CFLAGS]) AC_SUBST([OPTIONAL_LZO_LIBS]) AC_SUBST([OPTIONAL_PKCS11_HELPER_CFLAGS])doc/doxygen/doc_data_crypto.h +0
-0@@ -60,7 +60,7 @@* * @par Settings that control this module's activity * Whether or not the Data Channel Crypto module is active depends on the
- * compile-time \cUSE_CRYPTOand \cUSE_SSLpreprocessor macros. How it
+ * compile-time \cENABLE_CRYPTOand \cENABLE_SSLpreprocessor macros. How it
* processes packets received from the \linkdata_controlData Channel
* Control module\endlink at runtime depends on the associated \c
*crypto_optionsstructure. To perform cryptographic operations, the
\cinclude/openvpn-plugin.h +0
-5@@ -24,16 +24,25 @@#ifndef OPENVPN_PLUGIN_H_ #define OPENVPN_PLUGIN_H_ -#ifdef USE_SSL -# if defined(SSL_VERIFY_OPENSSL_H_ ) ||defined (SSL_VERIFY_POLARSSL_H_ ) -# define ENABLE_SSL_PLUGIN -# else -# warning "Neither OpenSSL or PoLarSSL headers included, disablingplugin's SSL support"
include/openvpn-plugin.h +16
-2-# endif -#endif /*USE_SSL*/ #define OPENVPN_PLUGIN_VERSION 3 +#ifdef ENABLE_SSL +#ifdef ENABLE_CRYPTO_POLARSSL +#include <polarssl/x509.h> +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef x509_cert openvpn_x509_cert_t ; +#endif +#else +#include <openssl/x509.h> +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef X509 openvpn_x509_cert_t ; +#endif +#endif +#endif +/* * Plug-in types. These types correspond to the set of script callbacks
* supported by OpenVPN.include/openvpn-plugin.h +0
-0@@ -268,9 +277,9 @@ struct openvpn_plugin_args_open_return* *per_client_context : the per-client context pointer which was returned by
*openvpn_plugin_client_constructor_v1, if defined.
*
- *current_cert_depth: Certificate depth of the certificate being passed over (only if compiled withUSE_SSLdefined)
+ *current_cert_depth: Certificate depth of the certificate being passed over (only if compiled withENABLE_SSLdefined)
*
- **current_cert: X509 Certificate object received from the client (only if compiled withUSE_SSLdefined)
+ **current_cert: X509 Certificate object received from the client (only if compiled withENABLE_SSLdefined)
*
*/
structopenvpn_plugin_args_func_ininclude/openvpn-plugin.h +2
-2@@ -280,9 +289,9 @@ struct openvpn_plugin_args_func_inconst char **const envp;openvpn_plugin_handle_t handle;void *per_client_context; -#ifdef ENABLE_SSL_PLUGIN +#ifdef ENABLE_SSL int current_cert_depth; -x509_cert_t *current_cert; +openvpn_x509_cert_t *current_cert;#else int __current_cert_depth_disabled;/* Unused, for compatibility purposes only */
void*__current_cert_disabled; /* Unused, for compatibility purposes
only */src/openvpn/Makefile.am +2
-0@@ -17,6 +17,7 @@ MAINTAINERCLEANFILES = \ INCLUDES = -I$(top_srcdir)/include AM_CFLAGS = \ + $(OPTIONAL_CRYPTO_CFLAGS) \ $(OPTIONAL_LZO_CFLAGS) \ $(OPTIONAL_PKCS11_HELPER_CFLAGS)@@ -103,6 +104,7 @@ openvpn_LDADD = \ $(SOCKETS_LIBS) \ $(OPTIONAL_LZO_LIBS) \ $(OPTIONAL_PKCS11_HELPER_LIBS) \ + $(OPTIONAL_CRYPTO_LIBS) \ $(OPTIONAL_SELINUX_LIBS) \ $(OPTIONAL_DL_LIBS) if WIN32src/openvpn/crypto.c +2
-2@@ -25,7 +25,7 @@#include "syshead.h" -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #include "crypto.h" #include "error.h" @@ -712,7 +712,7 @@ test_crypto (const struct crypto_options *co, struct frame* frame) gc_free (&gc); } -#ifdef USE_SSL +#ifdef ENABLE_SSL void
get_tls_handshake_key(const structkey_type*key_type,src/openvpn/crypto.c +3
-3@@ -1373,7 +1373,7 @@ get_random()return l; } -#ifndef USE_SSL +#ifndef ENABLE_SSL void init_ssl_lib (void )@@ -1392,7 +1392,7 @@ free_ssl_lib (void) ERR_free_strings (); } -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ /* * md5 functions @@ -1452,4 +1452,4 @@ md5_digest_equal (const struct md5_digest *d1, const struct md5_digest *d2) return memcmp(d1->digest, d2->digest, MD5_DIGEST_LENGTH) == 0; } -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ src/openvpn/crypto.h +3
-3@@ -30,7 +30,7 @@#ifndef CRYPTO_H #define CRYPTO_H -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #define ALLOW_NON_CBC_CIPHERS @@ -347,7 +347,7 @@ void key2_print (const struct key2* k,const char * prefix0, const char* prefix1); -#ifdef USE_SSL +#ifdef ENABLE_SSL #define GHK_INLINE (1<<0) void get_tls_handshake_key (const struct key_type *key_type,@@ -361,7 +361,7 @@ void get_tls_handshake_key (const struct key_type *key_type, void init_ssl_lib (void);void free_ssl_lib (void ); -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ /* * md5 functions
src/openvpn/crypto.h +1
-1@@ -394,5 +394,5 @@ key_ctx_bi_defined(const struct key_ctx_bi* key) } -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #endif /* CRYPTO_H */ src/openvpn/crypto_backend.h +2
-2@@ -32,10 +32,10 @@#include "config.h" -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "crypto_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "crypto_polarssl.h" #endif #include "basic.h" src/openvpn/crypto_openssl.c +1
-8@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_OPENSSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_CRYPTO_OPENSSL )#include "basic.h" #include "buffer.h" @@ -104,19 +104,7 @@ cipher_ok (const char* name)#define EVP_MD_name (e) OBJ_nid2sn(EVP_MD_type(e))#endif -/* -* -* OpenSSL engine support. Allows loading/unloading of engines. -* -*/ - -#if defined(HAVE_OPENSSL_ENGINE_H) &&
defined(HAVE_ENGINE_LOAD_BUILTIN_ENGINES)&&defined(HAVE_ENGINE_REGISTER_ALL_COMPLETE)&&defined(HAVE_ENGINE_CLEANUP)src/openvpn/crypto_openssl.c +6
-11-#define CRYPTO_ENGINE 1 -#else -#define CRYPTO_ENGINE 0 -#endif - -#if CRYPTO_ENGINE +#if HAVE_OPENSSL_ENGINE #include <openssl/engine.h> static bool engine_initialized = false;/* GLOBAL */ @@ -173,12 +161,12 @@ setup_engine (const char *engine)return e; } -#endif /* CRYPTO_ENGINE */ +#endif /* HAVE_OPENSSL_ENGINE */ void crypto_init_lib_engine (const char *engine_name) { -#if CRYPTO_ENGINE +#if HAVE_OPENSSL_ENGINE if (!engine_initialized) {ASSERT (engine_name);@@ -220,7 +208,7 @@ crypto_uninit_lib (void)fclose (fp);#endif -#if CRYPTO_ENGINE +#if HAVE_OPENSSL_ENGINE if (engine_initialized) {ENGINE_cleanup ();@@ -335,7 +323,7 @@ show_available_digests ()void show_available_engines () { -#if CRYPTO_ENGINE /* Only defined for OpenSSL */ +#if HAVE_OPENSSL_ENGINE /* Only defined for OpenSSL */ ENGINE *e;printf ("OpenSSL Crypto Engines\n\n" );@@ -741,4 +729,4 @@ hmac_ctx_final (HMAC_CTX *ctx, uint8_t *dst) HMAC_Final (ctx, dst, &in_hmac_len); } -#endif /* USE_CRYPTO && USE_OPENSSL */ +#endif /* ENABLE_CRYPTO && ENABLE_CRYPTO_OPENSSL */ src/openvpn/crypto_polarssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_POLARSSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_CRYPTO_POLARSSL )#include "errlevel.h" #include "basic.h" @@ -557,4 +557,4 @@ hmac_ctx_final (md_context_t *ctx, uint8_t *dst) ASSERT(0 == md_hmac_finish(ctx, dst)); } -#endif /* USE_CRYPTO && USE_POLARSSL */ +#endif /* ENABLE_CRYPTO && ENABLE_CRYPTO_POLARSSL */ src/openvpn/error.c +4
-4@@ -37,8 +37,8 @@#include "ps.h" #include "mstats.h" -#ifdef USE_CRYPTO -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_CRYPTO_OPENSSL #include <openssl/err.h> #endif #endif @@ -246,8 +246,8 @@ void x_msg (const unsigned int flags, const char *format, ...)SWAP ; } -#ifdef USE_CRYPTO -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_CRYPTO_OPENSSL if (flags & M_SSL) {int nerrs = 0;src/openvpn/error.h +1
-1@@ -96,7 +96,7 @@ extern int x_msg_line_num;#define M_ERRNO (1<<8)/* show errno description */ #define M_ERRNO_SOCK (1<<9)/* show socket errno description */ -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL # define M_SSL (1<<10)/* show SSL error */ #endif src/openvpn/forward- renamed from src/openvpn/forward-inline.h +0
-0
inline.h
index 64ca941..5853ce2 100644src/openvpn/forward-inline.h +3
-3@@ -35,7 +35,7 @@static inline void check_tls (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_dowork (struct context *c);if (c->c2.tls_multi)check_tls_dowork (c);@@ -49,7 +49,7 @@ check_tls (struct context *c)static inline void check_tls_errors (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_errors_co (struct context *c);void check_tls_errors_nco (struct context *c);if (c->c2.tls_multi && c->c2.tls_exit_signal)@@ -189,7 +189,7 @@ check_push_request (struct context *c)#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * Should we persist our anti-replay packet ID state to disk? */ src/openvpn/forward.c +3
-3@@ -81,7 +81,7 @@ show_wait_status (struct context *c)* traffic on the control-channel. * */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_dowork (struct context *c) {@@ -112,7 +112,7 @@ check_tls_dowork (struct context *c) }#endif -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )void check_tls_errors_co (struct context *c)@@ -232,7 +232,7 @@ check_connection_established_dowork (struct context *c)bool send_control_channel_string (struct context *c,const char *str,int msglevel) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->c2.tls_multi) {struct gc_arena gc = gc_new (); bool stat;src/openvpn/forward.c +7
-7@@ -449,8 +449,8 @@ encrypt_sign (struct context *c, bool comp_frag)#endif } -#ifdef USE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL /* * If TLS mode, get the key we will use to encrypt * the packet. @@ -472,8 +472,8 @@ encrypt_sign (struct context *c, bool comp_frag)*/ link_socket_get_outgoing_addr (&c->c2.buf,get_link_socket_info (c), &c->c2.to_link_addr); -#ifdef USE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL /* * In TLS mode, prepend the appropriate one-byte opcode * to the packet which identifies it as a data channel @@ -498,7 +498,7 @@ encrypt_sign (struct context *c, bool comp_frag)static void process_coarse_timers (struct context *c) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* flush current packet-id to file once per 60 seconds if --replay-persist was specified */ check_packet_id_persist_flush (c);@@ -789,8 +789,8 @@ process_incoming_link (struct context *c)if (!link_socket_verify_incoming_addr (&c->c2.buf, lsi, &c- >c2.from))link_socket_bad_incoming_addr (&c->c2.buf, lsi, &c->c2.from); -#ifdef USE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL if (c->c2.tls_multi) {/*src/openvpn/forward.c +1
-1@@ -820,7 +820,7 @@ process_incoming_link (struct context *c)if (c->c2.context_auth !=CAS_SUCCEEDED ) c->c2.buf.len =0 ;#endif -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ /* authenticate and decrypt the incoming packet */ decrypt_status = openvpn_decrypt (&c->c2.buf, c->c2.buffers-Quoted 1 line
decrypt_buf,&c->c2.crypto_options,&c->c2.frame);src/openvpn/forward.c +1
-1@@ -833,7 +833,7 @@ process_incoming_link (struct context *c) goto done; } -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_FRAGMENT if (c->c2.fragment)src/openvpn/init.c +5
-5@@ -428,7 +428,7 @@ next_connection_entry (struct context *c)static void init_query_passwords (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )/* Certificate password input */ if (c->options.key_pass_file)pem_password_setup (c->options.key_pass_file);@@ -629,7 +629,7 @@ init_static (void) {/* configure_path (); */ -#if defined(USE_CRYPTO ) && defined(DMALLOC ) +#if defined(ENABLE_CRYPTO ) && defined(DMALLOC )crypto_init_dmalloc ();#endif @@ -652,7 +652,7 @@ init_static (void)update_time (); -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO init_ssl_lib ();/* init PRNG used for IV generation */ @@ -838,7 +838,7 @@ init_static (void)void uninit_static (void ) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO free_ssl_lib ();#endif @@ -850,7 +850,7 @@ uninit_static (void)close_port_share ();#endif -#if defined(MEASURE_TLS_HANDSHAKE_STATS ) && defined(USE_CRYPTO ) && defined(USE_SSL) +#if defined(MEASURE_TLS_HANDSHAKE_STATS ) && defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )show_tls_performance_stats ();#endif
}src/openvpn/init.c +1
-1@@ -891,9 +891,9 @@ print_openssl_info (const struct options *options)/* * OpenSSL info print mode? */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (options->show_ciphers || options->show_digests || options-Quoted 1 line
show_enginessrc/openvpn/init.c +6
-6-#ifdef USE_SSL +#ifdef ENABLE_SSL || options->show_tls_ciphers#endif )@@ -904,7 +904,7 @@ print_openssl_info (const struct options *options)show_available_digests ();if (options->show_engines)show_available_engines (); -#ifdef USE_SSL +#ifdef ENABLE_SSL if (options->show_tls_ciphers)show_available_tls_ciphers ();#endif @@ -920,7 +920,7 @@ print_openssl_info (const struct options *options)bool do_genkey (const struct options * options) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (options->genkey) {int nbits_written;@@ -955,9 +955,9 @@ do_persist_tuntap (const struct options *options)notnull (options->dev,"TUN/TAP device (--dev)" ); if (options->ce.remote || options->ifconfig_local || options->ifconfig_remote_netmask -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO || options->shared_secret_file -#ifdef USE_SSL +#ifdef ENABLE_SSL || options->tls_server || options->tls_client #endif #endif@@ -1068,7 +1068,7 @@ const char * format_common_name (struct context *c, struct gc_arena *gc) { struct buffer out = alloc_buf_gc (256, gc); -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->c2.tls_multi) { buf_printf (&out, "[%s] ", tls_common_name (c->c2.tls_multi,false));
src/openvpn/init.c +2
-2@@ -1155,12 +1155,12 @@ do_init_timers (struct context *c, bool deferred)#endif /* initialize packet_id persistence timer */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (c->options.packet_id_file)event_timeout_init (&c->c2.packet_id_persist_interval,60 , now);#endif -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )/* initialize tmp_int optimization that limits the number of times we call
tls_multi_processin the main event loop */interval_init(&c->c2.tmp_int,TLS_MULTI_HORIZON,TLS_MULTI_REFRESH);src/openvpn/init.c +5
-5@@ -1967,20 +1967,20 @@ frame_finalize_options (struct context *c, const struct options *o)static void key_schedule_free (struct key_schedule *ks,bool free_ssl_ctx) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO free_key_ctx_bi (&ks->static_key); -#ifdef USE_SSL +#ifdef ENABLE_SSL if (tls_ctx_initialised (&ks->ssl_ctx) && free_ssl_ctx) {tls_ctx_free (&ks->ssl_ctx);free_key_ctx_bi (&ks->tls_auth_key); } -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ CLEAR (*ks); } -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO static void
init_crypto_pre(struct context *c, const unsigned int flags)src/openvpn/init.c +1
-1@@ -2091,7 +2091,7 @@ do_init_crypto_static (struct context *c, const unsigned int flags) options->use_iv); } -#ifdef USE_SSL +#ifdef ENABLE_SSL /* * Initialize the persistent component of OpenVPN's TLS mode,
src/openvpn/init.c +7
-7@@ -2330,10 +2330,10 @@ do_init_finalize_tls_frame (struct context *c) } } -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * No encryption or authentication. */ @@ -2349,20 +2349,20 @@ do_init_crypto_none (const struct context *c)static void do_init_crypto (struct context *c,const unsigned int flags) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (c->options.shared_secret_file)do_init_crypto_static (c, flags); -#ifdef USE_SSL +#ifdef ENABLE_SSL else if (c->options.tls_server || c->options.tls_client) do_init_crypto_tls (c, flags);#endif else /* no encryption or authentication. */do_init_crypto_none (c ); -#else /* USE_CRYPTO */ +#else /* ENABLE_CRYPTO */ msg (M_WARN ,"******* WARNING *******: " PACKAGE_NAME " built without OpenSSL -- encryption and authentication features disabled -- all data will be tunnelled as cleartext"); -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ }static void
src/openvpn/init.c +2
-2@@ -2501,13 +2501,13 @@ do_option_warnings (struct context *c)#endif #endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (!o->replay) msg (M_WARN, "WARNING: You have disabled Replay Protection (--no- replay) which may make " PACKAGE_NAME " less secure"); if (!o->use_iv) msg (M_WARN, "WARNING: You have disabled Crypto IVs (--no-iv) which may make " PACKAGE_NAME " less secure"); -#ifdef USE_SSL +#ifdef ENABLE_SSL if (o->tls_server)warn_on_use_of_common_subnets ();if (
o->tls_clientsrc/openvpn/init.c +12
-12@@ -2540,7 +2540,7 @@ do_option_warnings (struct context *c)static void do_init_frame_tls (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )do_init_finalize_tls_frame (c);#endif }@@ -2557,7 +2557,7 @@ init_context_buffers (const struct frame *frame) b->aux_buf =alloc_buf (BUF_SIZE (frame)); -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO b->encrypt_buf =alloc_buf (BUF_SIZE (frame)); b->decrypt_buf =alloc_buf (BUF_SIZE (frame));#endif @@ -2584,7 +2584,7 @@ free_context_buffers (struct context_buffers *b)free_buf (&b->lzo_decompress_buf);#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO free_buf (&b->encrypt_buf);free_buf (&b->decrypt_buf);#endif @@ -2733,7 +2733,7 @@ do_compute_occ_strings (struct context *c)msg (D_SHOW_OCC ,"Expected Remote Options String: '%s'" , c->c2.options_string_remote); -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO msg (D_SHOW_OCC_HASH, "Local Options hash (VER=%s): '%s'", options_string_version (c->c2.options_string_local, &gc), md5sum ((uint8_t*)c->c2.options_string_local,@@ -2744,7 +2744,7 @@ do_compute_occ_strings (struct context *c) strlen (c->c2.options_string_remote), 9, &gc));#endif -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->c2.tls_multi) tls_multi_init_set_options (c->c2.tls_multi, c->c2.options_string_local,@@ -2830,7 +2830,7 @@ do_close_free_buf (struct context *c)static void do_close_tls (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->c2.tls_multi) {tls_multi_free (c->c2.tls_multi, true);@@ -2886,7 +2886,7 @@ do_close_link_socket (struct context *c)static void do_close_packet_id (struct context *c) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO packet_id_free (&c->c2.packet_id);packet_id_persist_save (&c->c1.pid_persist);if (!(c->sig->signal_received ==SIGUSR1 ))@@ -3064,7 +3064,7 @@ do_setup_fast_io (struct context *c)static void do_signal_on_tls_errors (struct context *c) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (c->options.tls_exit) c->c2.tls_exit_signal =SIGTERM ;else @@ -3609,9 +3609,9 @@ inherit_context_child (struct context *dest,/* c1 init */ packet_id_persist_init (&dest->c1.pid_persist); -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO dest->c1.ks.key_type = src->c1.ks.key_type; -#ifdef USE_SSL +#ifdef ENABLE_SSL /* inherit SSL context */ dest->c1.ks.ssl_ctx = src->c1.ks.ssl_ctx; dest->c1.ks.tls_auth_key = src->c1.ks.tls_auth_key;@@ -3688,7 +3688,7 @@ inherit_context_top (struct context *dest,/* detach plugins */ dest->plugins_owned = false; -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) dest->c2.tls_multi =NULL ;#endif @@ -3733,7 +3733,7 @@ close_context (struct context *c, int sig, unsigned int flags)context_gc_free (c ); } -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * Do a loopback test
src/openvpn/init.c +1
-1@@ -3766,7 +3766,7 @@ test_crypto_thread (void *arg)bool do_test_crypto (const struct options *o) { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (o->test_crypto) {struct context c;src/openvpn/manage.c +0
-0@@ -699,7 +699,7 @@ man_query_need_str (struct management *man, constchar *type, const char *action
static void
man_forget_passwords(struct management *man)
{src/openvpn/manage.c +2
-2-#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )ssl_purge_auth (false);msg (M_CLIENT ,"SUCCESS: Passwords were forgotten" );#endif @@ -1714,7 +1714,7 @@ man_reset_client_socket (struct management *man, const bool exiting) }if (!exiting) { -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )if (man->settings.flags &MF_FORGET_DISCONNECT )ssl_purge_auth (false);#endif
src/openvpn/misc.c +1
-1@@ -1243,7 +1243,7 @@ test_file (const char *filename)return ret; } -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* create a temporary filename in directory */ const char *src/openvpn/misc.h +0
-1@@ -194,7 +194,7 @@ int openvpn_chdir (const char* dir);extern int inetd_socket_descriptor;void save_inetd_socket_descriptor (void ); -/* init random() function, only used as source for weak random numbers, when !USE_CRYPTO */
+/* initrandom()function, only used as source for weak random numbers, when !ENABLE_CRYPTO */
voidinit_random_seed(void);/* set/delete environmental variable */
src/openvpn/misc.h +0
-0@@ -252,7 +252,7 @@ void sleep_milliseconds (unsigned int n);void sleep_until_signal (void );/* an analogue to the random() function, but use OpenSSL functions if available */
src/openvpn/misc.h +2
-2-#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO long int get_random (void );#else #define get_random random@@ -273,7 +273,7 @@ bool delete_file (const char *filename);/* return true if pathname is absolute */ bool absolute_pathname (const char *pathname); -/* prepend a random prefix to hostname (need USE_CRYPTO) */ +/* prepend a random prefix to hostname (need ENABLE_CRYPTO) */ const char *hostname_randomize (const char *hostname,struct gc_arena *gc);/*
src/openvpn/openvpn.h +9
-9@@ -55,24 +55,24 @@struct key_schedule { -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* which cipher, HMAC digest, and key sizes are we using? */ struct key_type key_type;/* pre-shared static key, read from a file */ struct key_ctx_bi static_key; -#ifdef USE_SSL +#ifdef ENABLE_SSL /* our global SSL context */ struct tls_root_ctx ssl_ctx;/* optional authentication HMAC key for TLS control channel */ struct key_ctx_bi tls_auth_key; -#endif /* USE_SSL */ -#else /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#else /* ENABLE_CRYPTO */ int dummy; -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ };/* @@ -99,7 +99,7 @@ struct context_buffersstruct buffer aux_buf;/* workspace buffers used by crypto routines */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO struct buffer encrypt_buf;struct buffer decrypt_buf;#endif @@ -331,12 +331,12 @@ struct context_2int occ_mtu_load_n_tries;#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * TLS-mode crypto objects. */ -#ifdef USE_SSL +#ifdef ENABLE_SSL struct tls_multi *tls_multi;/**< TLS state structure for this VPN * tunnel. */ @@ -358,7 +358,7 @@ struct context_2/* throw this signal on TLS errors */ int tls_exit_signal; -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ struct crypto_options crypto_options;/**< Security parameters and crypto state
src/openvpn/openvpn.h +2
-2@@ -370,7 +370,7 @@ struct context_2struct packet_id packet_id;struct event_timeout packet_id_persist_interval; -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_LZO struct lzo_compress_workspace lzo_compwork;@@ -566,7 +566,7 @@ struct context* have been compiled in. */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#define TLS_MODE (c) ((c)->c2.tls_multi != NULL)#define PROTO_DUMP_FLAGS (check_debug_level (D_LINK_RW_VERBOSE) ? (PD_SHOW_DATA|PD_VERBOSE) : 0)#define
PROTO_DUMP(buf, gc)protocol_dump((buf), \src/openvpn/openvpn.h +2
-2@@ -579,13 +579,13 @@ struct context#define PROTO_DUMP (buf, gc) format_hex (BPTR (buf), BLEN (buf), 80, gc)#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #define MD5SUM (buf, len, gc) md5sum((buf), (len), 0, (gc))#else #define MD5SUM (buf, len, gc) "[unavailable]"#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #define CIPHER_ENABLED (c) (c->c1.ks.key_type.cipher != NULL)#else #define
CIPHER_ENABLED(c)(false)src/openvpn/options.c +11
-11@@ -56,25 +56,25 @@const char title_string[] =PACKAGE_STRING " " TARGET_ALIAS -#ifdef USE_CRYPTO -#ifdef USE_SSL -#if defined(USE_POLARSSL ) +#ifdef ENABLE_CRYPTO +#ifdef ENABLE_SSL +#if defined(ENABLE_CRYPTO_POLARSSL ) " [SSL (PolarSSL)]" -#elif defined(USE_OPENSSL ) +#elif defined(ENABLE_CRYPTO_OPENSSL )" [SSL (OpenSSL)]" #else " [SSL]" -#endif /* defined(USE_POLARSSL) */ -#else /* ! USE_SSL */ -#if defined(USE_POLARSSL ) +#endif /* defined(ENABLE_CRYPTO_POLARSSL) */ +#else /* ! ENABLE_SSL */ +#if defined(ENABLE_CRYPTO_POLARSSL ) " [CRYPTO (PolarSSL)]" -#elif defined(USE_OPENSSL ) +#elif defined(ENABLE_CRYPTO_OPENSSL )" [CRYPTO (OpenSSL)]" #else " [CRYPTO]" -#endif /* defined(USE_POLARSSL) */ -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* defined(ENABLE_CRYPTO_POLARSSL) */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_LZO #ifdef ENABLE_LZO_STUB " [LZO (STUB)]" @@ -503,7 +503,7 @@ static const char usage_message[] = "--explicit-exit-notify [n] : On exit/restart, send exit signalto\n"
" server/remote. n = # of retries, default=1.\n"
#endifsrc/openvpn/options.c +1
-1-#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO "\n" "Data Channel Encryption Options (must be compatible betweenpeers):\n"
"(These options are meaningful for both Static Key & TLS-mode)\n"src/openvpn/options.c +0
-0@@ -526,7 +526,7 @@ static const char usage_message[] ="--keysize n : Size of cipher key in bits (optional).\n" " If unspecified, defaults to cipher-specificdefault.\n"
#endifsrc/openvpn/options.c +1
-1-#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL "--engine [name] : Enable OpenSSL hardware crypto enginefunctionality.\n"
#endif
"--no-replay : Disable replay protection.\n"src/openvpn/options.c +1
-1@@ -539,7 +539,7 @@ static const char usage_message[] =" using file.\n" "--test-crypto : Run a self-test of crypto features enabled.\n" " For debugging only.\n" -#ifdef USE_SSL +#ifdef ENABLE_SSL"\n" "TLS Key Negotiation Options:\n" "(These options are meaningful only for TLS-mode)\n" @@ -549,7 +549,7 @@ static const char usage_message[] =" number, such as 1 (default), 2, etc.\n" "--ca file : Certificate authority file in .pem formatcontaining\n"
" root certificate.\n"src/openvpn/options.c +1
-1-#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL "--capath dir : A directory of trusted certificates (CAs"#if OPENSSL_VERSION_NUMBER >=0x00907000L " and CRLs).\n" @@ -557,7 +557,7 @@ static const char usage_message[] =").\n" " WARNING: no support of CRL available with thisversion.\n"
#endif /*OPENSSL_VERSION_NUMBER>=0x00907000L*/src/openvpn/options.c +1
-1-#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ "--dh file : File containing Diffie Hellman parameters\n" " in .pem format (for --tls-server only).\n" " Use \"openssl dhparam -out dh1024.pem 1024\" togenerate.\n"
src/openvpn/options.c +0
-0@@ -565,7 +565,7 @@ static const char usage_message[] =" by a Certificate Authority in --ca file.\n" "--extra-certs file : one or more PEM certs that complete the certchain.\n"
"--key file : Local private key in .pem format.\n"src/openvpn/options.c +1
-1-#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL "--pkcs12 file : PKCS#12 file containing local private key, localcertificate\n"
" and optionally the root CA certificate.\n"
#endifsrc/openvpn/options.c +0
-0@@ -616,7 +616,7 @@ static const char usage_message[] = "--x509-track x : Save peer X509 attribute x in environment for useby\n"
" plugins and management interface.\n"
#endifsrc/openvpn/options.c +1
-1-#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL "--remote-cert-ku v ... : Require that the peer certificate wassigned with\n"
" explicit key usage, you can specify more than one
value.\n"
" value should be given in hex format.\n"src/openvpn/options.c +0
-0@@ -626,8 +626,8 @@ static const char usage_message[] = "--remote-cert-tls t: Require that peer certificate was signed withexplicit\n"
" key usage and extended key usage based on RFC3280
TLS rules.\n"
" t = 'client' | 'server'.\n"
-#endif /*OPENSSL_VERSION_NUMBER||USE_POLARSSL
*/src/openvpn/options.c +1
-1-#endif /* USE_SSL */ +#endif /* OPENSSL_VERSION_NUMBER ||
ENABLE_CRYPTO_POLARSSL*/src/openvpn/options.c +1
-0+#endif /* ENABLE_SSL */ #ifdef ENABLE_PKCS11 "\n" "PKCS#11 Options:\n" @@ -652,7 +652,7 @@ static const char usage_message[] = "--show-ciphers : Show cipher algorithms to use with --cipheroption.\n"
"--show-digests : Show message digest algorithms to use with --auth
option.\n"
"--show-engines : Show hardware crypto accelerator engines (if
available).\n"src/openvpn/options.c +1
-1-#ifdef USE_SSL +#ifdef ENABLE_SSL "--show-tls : Show all TLS ciphers (TLS used only as a controlchannel).\n"
#endif
#ifdef WIN32src/openvpn/options.c +0
-0@@ -718,7 +718,7 @@ static const char usage_message[] = "--genkey : Generate a random key to be used as a sharedsecret,\n"
" for use with the --secret option.\n"
"--secret file : Write key to file.\n"src/openvpn/options.c +2
-2-#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ #ifdef TUNSETPERSIST "\n" "Tun/tap config mode (available with linux 2.4+):\n" @@ -819,7 +819,7 @@ init_options (struct options *o, const bool init_gc) o->scheduled_exit_interval = 5; o->server_poll_timeout =0 ;#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO o->ciphername ="BF-CBC" ; o->ciphername_defined = true;o->authname = "SHA1";src/openvpn/options.c +1
-1@@ -831,7 +831,7 @@ init_options (struct options *o, const bool init_gc) o->replay_time = DEFAULT_TIME_BACKTRACK; o->use_iv = true; o->key_direction =KEY_DIRECTION_BIDIRECTIONAL ; -#ifdef USE_SSL +#ifdef ENABLE_SSL o->key_method =2 ; o->tls_timeout =2 ;o->renegotiate_seconds = 3600;src/openvpn/options.c +2
-2@@ -840,8 +840,8 @@ init_options (struct options *o, const bool init_gc)#ifdef ENABLE_X509ALTUSERNAME o->x509_username_field =X509_USERNAME_FIELD_DEFAULT ;#endif -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_PKCS11 o->pkcs11_pin_cache_period =-1 ;#endif /*
ENABLE_PKCS11*/src/openvpn/options.c +1
-1@@ -1050,7 +1050,7 @@ is_stateful_restart (const struct options *o)return is_persist_option (o) ||connection_list_defined (o); } -#ifdef USE_SSL +#ifdef ENABLE_SSL static uint8_t *parse_hash_fingerprint (const char *str,int nbytes,int msglevel,struct gc_arena *gc){
src/openvpn/options.c +7
-7@@ -1419,12 +1419,12 @@ show_settings (const struct options *o)SHOW_INT (persist_mode);#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO SHOW_BOOL (show_ciphers);SHOW_BOOL (show_digests);SHOW_BOOL (show_engines);SHOW_BOOL (genkey); -#ifdef USE_SSL +#ifdef ENABLE_SSL SHOW_STR (key_pass_file);SHOW_BOOL (show_tls_ciphers);#endif @@ -1555,7 +1555,7 @@ show_settings (const struct options *o)plugin_option_list_print (o->plugin_list,D_SHOW_PARMS );#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO SHOW_STR (shared_secret_file);SHOW_INT (key_direction);SHOW_BOOL (ciphername_defined);@@ -1565,9 +1565,9 @@ show_settings (const struct options *o)SHOW_STR (prng_hash);SHOW_INT (prng_nonce_secret_len);SHOW_INT (keysize); -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL SHOW_BOOL (engine); -#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ SHOW_BOOL (replay);SHOW_BOOL (mute_replay_warnings);SHOW_INT (replay_window);@@ -1576,7 +1576,7 @@ show_settings (const struct options *o)SHOW_BOOL (use_iv);SHOW_BOOL (test_crypto); -#ifdef USE_SSL +#ifdef ENABLE_SSL SHOW_BOOL (tls_server);SHOW_BOOL (tls_client);SHOW_INT (key_method);@@ -1585,7 +1585,7 @@ show_settings (const struct options *o)SHOW_STR (dh_file);SHOW_STR (cert_file);SHOW_STR (priv_key_file); -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL SHOW_STR (pkcs12_file);#endif #ifdef ENABLE_CRYPTOAPI @@ -1892,7 +1892,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
init_options (&defaults, true);src/openvpn/options.c +1
-1-#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO if (options->test_crypto) {notnull (options->shared_secret_file,"key file (--secret)" );@@ -1930,7 +1930,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
msg (M_USAGE, "--inetd nowait can only be used with --proto tcp-
server");if (options->inetd == INETD_NOWAITsrc/openvpn/options.c +1
-1-#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && !(options->tls_server || options->tls_client) #endif )@@ -2218,7 +2218,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
}#endif /*
P2MP_SERVER*/src/openvpn/options.c +1
-1-#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* * Check consistency of replay options @@ -2237,7 +2237,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
* SSL/TLS mode sanity checks.
*/src/openvpn/options.c +1
-2-#ifdef USE_SSL +#ifdef ENABLE_SSL if (options->tls_server + options->tls_client + (options->shared_secret_file !=NULL ) >1 ) msg (M_USAGE, "specify only one of --tls-server, --tls-client, or --secret");@@ -2286,7 +2286,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
#endif if (options->pkcs12_file) {src/openvpn/options.c +1
-1-#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL msg(M_USAGE, "Parameter --pkcs12 cannot be used with thePolarSSL version version of OpenVPN.");
#else if (options->ca_path)src/openvpn/options.c +0
-0@@ -2299,7 +2299,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
} else {src/openvpn/options.c +1
-1-#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL if (!(options->ca_file))msg (M_USAGE ,"You must define CA file (--ca)" );if (options->ca_path)@@ -2348,7 +2348,7 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
MUST_BE_UNDEF (dh_file); MUST_BE_UNDEF (cert_file); MUST_BE_UNDEF (priv_key_file);src/openvpn/options.c +1
-1-#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL MUST_BE_UNDEF (pkcs12_file);#endif MUST_BE_UNDEF (cipher_list);@@ -2383,8 +2383,8 @@ options_postprocess_verify_ce (const structoptions *options, const struct conne
msg (M_USAGE, err, "--pull"); }#undef
MUST_BE_UNDEFsrc/openvpn/options.c +3
-3-#endif /* USE_CRYPTO */ -#endif /* USE_SSL */ +#endif /* ENABLE_CRYPTO */ +#endif /* ENABLE_SSL */ #if P2MP if (options->auth_user_pass_file && !options->pull)@@ -2667,7 +2667,7 @@ options_postprocess_filechecks (struct options *options)bool errs = false;/* ** SSL/TLS/crypto related files ** */ -#ifdef USE_SSL +#ifdef ENABLE_SSL errs |=check_file_access (CHKACC_FILE |CHKACC_INLINE , options- >dh_file, R_OK, "--dh");errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, options-Quoted 1 line
ca_file,R_OK, "--ca");errs |=
check_file_access(CHKACC_FILE,options->ca_path,R_OK, "--
capath");src/openvpn/options.c +4
-4@@ -2688,20 +2688,20 @@ options_postprocess_filechecks (struct options *options) errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, options- >tls_auth_file, R_OK, "--tls-auth"); -#endif /* USE_SSL */ -#ifdef USE_CRYPTO +#endif /* ENABLE_SSL */ +#ifdef ENABLE_CRYPTO errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, options- >shared_secret_file, R_OK, "--secret"); errs |= check_file_access (CHKACC_DIRPATH|CHKACC_FILEXSTWR, options->packet_id_file, R_OK|W_OK, "-- replay-persist"); -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ /* ** Password files ** */ -#ifdef USE_SSL +#ifdef ENABLE_SSL errs |= check_file_access (CHKACC_FILE, options->key_pass_file, R_OK,"--askpass");src/openvpn/options.c +3
-3-#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ #ifdef ENABLE_MANAGEMENT errs |= check_file_access (CHKACC_FILE|CHKACC_ACPTSTDIN, options->management_user_pass, R_OK,@@ -2726,10 +2726,10 @@ options_postprocess_filechecks (struct options *options) R_OK|W_OK, "--status");/* ** Config related ** */ -#ifdef USE_SSL +#ifdef ENABLE_SSL errs |=check_file_access (CHKACC_FILE , options->tls_export_cert,R_OK |W_OK |X_OK ,"--tls-export-cert" ); -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ #if P2MP_SERVER errs |= check_file_access (CHKACC_FILE, options->client_config_dir,R_OK|X_OK, "--client-config-dir");src/openvpn/options.c +16
-16@@ -2968,9 +2968,9 @@ options_string (const struct options *o,buf_printf (&out,",mtu-dynamic" );#endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO -#ifdef USE_SSL +#ifdef ENABLE_SSL #define TLS_CLIENT (o->tls_client)#define TLS_SERVER (o->tls_server)#else @@ -3014,7 +3014,7 @@ options_string (const struct options *o,buf_printf (&out,",no-iv" ); } -#ifdef USE_SSL +#ifdef ENABLE_SSL /* * SSL Options */ @@ -3043,12 +3043,12 @@ options_string (const struct options *o,buf_printf (&out,",tls-server" ); } } -#endif /* USE_SSL */ +#endif /* ENABLE_SSL */ #undef TLS_CLIENT#undef TLS_SERVER -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ return BSTR (&out); }@@ -3357,7 +3357,7 @@ usage (void)struct options o;init_options (&o, true); -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) fprintf (fp, usage_message, title_string, o.ce.connect_retry_seconds,@@ -3368,7 +3368,7 @@ usage (void) o.replay_window, o.replay_time, o.tls_timeout, o.renegotiate_seconds, o.handshake_window, o.transition_window); -#elif defined(USE_CRYPTO ) +#elif defined(ENABLE_CRYPTO ) fprintf (fp, usage_message, title_string, o.ce.connect_retry_seconds,@@ -6211,7 +6211,7 @@ add_option (struct options *options, options->lzo &= ~LZO_ADAPTIVE ; }#endif /* ENABLE_LZO */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO else if (streq (p[0], "show-ciphers")) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6383,7 +6383,7 @@ add_option (struct options *options,VERIFY_PERMISSION (OPT_P_GENERAL ); options->test_crypto = true; } -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "engine")) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6394,7 +6394,7 @@ add_option (struct options *options, else options->engine = "auto"; } -#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ #ifdef HAVE_EVP_CIPHER_CTX_SET_KEY_LENGTH else if (streq (p[0], "keysize") && p[1]) {@@ -6410,7 +6410,7 @@ add_option (struct options *options, options->keysize = keysize; }#endif -#ifdef USE_SSL +#ifdef ENABLE_SSL else if (streq (p[0], "show-tls")) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6437,13 +6437,13 @@ add_option (struct options *options, }#endif } -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "capath") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL ); options->ca_path = p[1 ]; } -#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ else if (streq (p[0], "dh") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6500,7 +6500,7 @@ add_option (struct options *options, }#endif } -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "pkcs12") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6512,7 +6512,7 @@ add_option (struct options *options, }#endif } -#endif /* USE_POLARSSL */ +#endif /* ENABLE_CRYPTO_POLARSSL */ else if (streq (p[0], "askpass")) {VERIFY_PERMISSION (OPT_P_GENERAL );@@ -6574,7 +6574,7 @@ add_option (struct options *options,warn_multiple_script (options->tls_verify,"tls-verify" ); options->tls_verify =string_substitute (p[1 ],',' ,' ' , &options->gc); } -#ifndef USE_POLARSSL +#ifndef ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "tls-export-cert") && p[1]) {VERIFY_PERMISSION (OPT_P_GENERAL);src/openvpn/options.c +3
-3@@ -6599,7 +6599,7 @@ add_option (struct options *options, goto err; } } -#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL else if (streq (p[0], "remote-cert-ku")) {int j;@@ -6716,8 +6716,8 @@ add_option (struct options *options, options->x509_username_field = p[1 ]; }#endif /* ENABLE_X509ALTUSERNAME */ -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_PKCS11 else if (streq (p[0], "show-pkcs11-ids") && p[1]) {src/openvpn/options.h +1
-1@@ -80,7 +80,7 @@ struct options_pre_pull };#endif -#if defined(USE_CRYPTO ) && !defined(USE_OPENSSL ) && !defined(USE_POLARSSL) +#if defined(ENABLE_CRYPTO ) && !defined(ENABLE_CRYPTO_OPENSSL ) && !defined(ENABLE_CRYPTO_POLARSSL )# error "At least one of OpenSSL or PolarSSL needs to be defined."#endif
src/openvpn/options.h +6
-6@@ -211,12 +211,12 @@ struct optionsbool persist_config;int persist_mode; -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO const char *key_pass_file;bool show_ciphers;bool show_digests;bool show_engines; -#ifdef USE_SSL +#ifdef ENABLE_SSL bool show_tls_ciphers;#endif bool genkey;@@ -498,7 +498,7 @@ struct options#endif #endif -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO /* Cipher parms */ const char *shared_secret_file;#if ENABLE_INLINE_FILES @@ -521,7 +521,7 @@ struct optionsbool use_iv;bool test_crypto; -#ifdef USE_SSL +#ifdef ENABLE_SSL /* TLS (control channel) parms */ bool tls_server;bool tls_client;@@ -605,8 +605,8 @@ struct optionsbool tls_exit; -#endif /* USE_SSL */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_SSL */ +#endif /* ENABLE_CRYPTO */ #ifdef ENABLE_X509_TRACK const struct x509_track *x509_track;src/openvpn/packet_id.c +2
-2@@ -33,7 +33,7 @@#include "syshead.h" -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #include "packet_id.h" #include "misc.h" @@ -593,4 +593,4 @@ packet_id_interactive_test () }#endif -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ src/openvpn/packet_id.h +2
-2@@ -28,7 +28,7 @@* attempts to replay them back later. */ -#ifdef USE_CRYPTO +#ifdef ENABLE_CRYPTO #ifndef PACKET_ID_H #define PACKET_ID_H @@ -335,4 +335,4 @@ packet_id_reap_test (struct packet_id_rec *p) }#endif /* PACKET_ID_H */ -#endif /* USE_CRYPTO */ +#endif /* ENABLE_CRYPTO */ src/openvpn/pkcs11_openssl.c +1
-1@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(ENABLE_PKCS11 ) && defined(USE_OPENSSL ) +#if defined(ENABLE_PKCS11 ) && defined(ENABLE_CRYPTO_OPENSSL )#include "errlevel.h" #include "pkcs11_backend.h" src/openvpn/pkcs11_polarssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(ENABLE_PKCS11 ) && defined(USE_POLARSSL ) +#if defined(ENABLE_PKCS11 ) && defined(ENABLE_CRYPTO_POLARSSL )#include "errlevel.h" #include "pkcs11_backend.h" @@ -117,4 +117,4 @@ cleanup: return ret; } -#endif /* defined(ENABLE_PKCS11) && defined(USE_POLARSSL) */ +#endif /* defined(ENABLE_PKCS11) && defined(ENABLE_CRYPTO_POLARSSL) */ src/openvpn/plugin.c +3
-3@@ -351,9 +351,9 @@ plugin_call_item (const struct plugin *p,const struct argv *av, struct openvpn_plugin_string_list **retlist, const char **envp -#ifdef USE_SSL +#ifdef ENABLE_SSL , int certdepth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif ) {@@ -380,7 +380,7 @@ plugin_call_item (const struct plugin *p, (const char **const ) envp, p->plugin_handle, per_client_context, -#ifdef USE_SSL +#ifdef ENABLE_SSL (current_cert ? certdepth : -1),
current_cert
#elsesrc/openvpn/plugin.c +3
-3@@ -590,9 +590,9 @@ plugin_call_ssl (const struct plugin_list *pl,const struct argv *av, struct plugin_return *pr, struct env_set *es -#ifdef USE_SSL +#ifdef ENABLE_SSL , int certdepth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif ) {@@ -620,7 +620,7 @@ plugin_call_ssl (const struct plugin_list *pl, av, pr ? &pr->list[i] :NULL , envp -#ifdef USE_SSL +#ifdef ENABLE_SSL ,certdepth, current_cert #endifsrc/openvpn/plugin.h +7
-7@@ -29,10 +29,10 @@#ifndef OPENVPN_PLUGIN_H #define OPENVPN_PLUGIN_H -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_verify_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "ssl_verify_polarssl.h" #endif #include "openvpn-plugin.h" @@ -127,9 +127,9 @@ int plugin_call_ssl (const struct plugin_list *pl,const struct argv *av, struct plugin_return *pr, struct env_set *es -#ifdef USE_SSL +#ifdef ENABLE_SSL , int current_cert_depth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif );@@ -183,9 +183,9 @@ plugin_call_ssl (const struct plugin_list *pl,const struct argv *av, struct plugin_return *pr, struct env_set *es -#ifdef USE_SSL +#ifdef ENABLE_SSL , int current_cert_depth, - x509_cert_t *current_cert + openvpn_x509_cert_t *current_cert #endif ) {@@ -202,7 +202,7 @@ plugin_call(const struct plugin_list *pl, struct env_set *es) {return plugin_call_ssl (pl, type, av, pr, es -#ifdef USE_SSL +#ifdef ENABLE_SSL ,-1 ,NULL #endif );src/openvpn/reliable.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "buffer.h" #include "error.h" @@ -748,4 +748,4 @@ reliable_debug_print (const struct reliable *rel, char *desc)#else static void dummy (void ) {} -#endif /* USE_CRYPTO && USE_SSL*/ +#endif /* ENABLE_CRYPTO && ENABLE_SSL*/ src/openvpn/reliable.h +2
-2@@ -29,7 +29,7 @@*/ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#ifndef RELIABLE_H #define RELIABLE_H @@ -477,4 +477,4 @@ void reliable_ack_debug_print (const struct reliable_ack *ack, char *desc);#endif /* RELIABLE_H */ -#endif /* USE_CRYPTO && USE_SSL */ +#endif /* ENABLE_CRYPTO && ENABLE_SSL */ src/openvpn/session_id.c +2
-2@@ -33,7 +33,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "error.h" #include "common.h" @@ -58,4 +58,4 @@ session_id_print (const struct session_id *sid, struct gc_arena *gc)#else static void dummy (void ) {} -#endif /* USE_CRYPTO && USE_SSL*/ +#endif /* ENABLE_CRYPTO && ENABLE_SSL*/ src/openvpn/session_id.h +2
-2@@ -30,7 +30,7 @@* negotiated). */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#ifndef SESSION_ID_H #define SESSION_ID_H @@ -83,4 +83,4 @@ void session_id_random (struct session_id *sid);const char *session_id_print (const struct session_id *sid,struct gc_arena *gc);#endif /* SESSION_ID_H */ -#endif /* USE_CRYPTO && USE_SSL */ +#endif /* ENABLE_CRYPTO && ENABLE_SSL */ src/openvpn/ssl.c +2
-2@@ -41,7 +41,7 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "error.h" #include "common.h" @@ -342,7 +342,7 @@ init_ssl (const struct options *options, struct tls_root_ctx *new_ctx)#ifdef MANAGMENT_EXTERNAL_KEY else if ((options->management_flags & MF_EXTERNAL_KEY) && options- >cert_file) { -x509_cert_t *my_cert =NULL ; +openvpn_x509_cert_t *my_cert =NULL ; tls_ctx_load_cert_file(new_ctx, options->cert_file, options-Quoted 1 line
cert_file_inline,&my_cert); tls_ctx_use_external_private_key(new_ctx, my_cert);src/openvpn/ssl.c +1
-1@@ -3370,4 +3370,4 @@ done:#else static void dummy (void ) {} -#endif /* USE_CRYPTO && USE_SSL*/ +#endif /* ENABLE_CRYPTO && ENABLE_SSL*/ src/openvpn/ssl.h +2
-2@@ -30,7 +30,7 @@#ifndef OPENVPN_SSL_H #define OPENVPN_SSL_H -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "basic.h" #include "common.h" @@ -502,6 +502,6 @@ void show_tls_performance_stats(void);/*#define EXTRACT_X509_FIELD_TEST*/ void extract_x509_field_test (void ); -#endif /* USE_CRYPTO && USE_SSL */ +#endif /* ENABLE_CRYPTO && ENABLE_SSL */ #endif src/openvpn/ssl_backend.h +3
-3@@ -33,11 +33,11 @@#include "buffer.h" -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_openssl.h" #include "ssl_verify_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "ssl_polarssl.h" #include "ssl_verify_polarssl.h" #endif @@ -193,7 +193,7 @@ void tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file,#if ENABLE_INLINE_FILES const char *cert_file_inline,#endif -x509_cert_t **x509 +openvpn_x509_cert_t **x509 );/**
src/openvpn/ssl_backend.h +1
-1@@ -201,7 +201,7 @@ void tls_ctx_load_cert_file (struct tls_root_ctx*ctx, const char *cert_file, * * @param x509 certificate to free */ -void tls_ctx_free_cert_file (x509_cert_t *x509); +void tls_ctx_free_cert_file (openvpn_x509_cert_t *x509);/** * Load private key file into the given TLS context.
src/openvpn/ssl_backend.h +1
-1@@ -233,7 +233,7 @@ int tls_ctx_load_priv_file (struct tls_root_ctx*ctx, const char *priv_key_file * @return 1 if an error occurred, 0 if parsing was * successful. */ -int tls_ctx_use_external_private_key (struct tls_root_ctx *ctx, x509_cert_t *cert); +int tls_ctx_use_external_private_key (struct tls_root_ctx *ctx,openvpn_x509_cert_t *cert);#endif
src/openvpn/ssl_openssl.c +3
-3@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_OPENSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_OPENSSL )#include "errlevel.h" #include "buffer.h" @@ -1020,13 +1020,13 @@ key_state_write_plaintext (struct key_state_ssl *ks_ssl, struct buffer *buf)int ret =0 ;perf_push (PERF_BIO_WRITE_PLAINTEXT ); -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL ASSERT (NULL != ks_ssl); ret =bio_write (ks_ssl->ssl_bio,BPTR (buf),BLEN (buf),"tls_write_plaintext" );bio_write_post (ret, buf); -#endif /* USE_OPENSSL */ +#endif /* ENABLE_CRYPTO_OPENSSL */ perf_pop ();return ret;src/openvpn/ssl_openssl.c +1
-1@@ -1187,4 +1187,4 @@ get_highest_preference_tls_cipher (char *buf, int size) SSL_CTX_free (ctx); } -#endif /* defined(USE_SSL) && defined(USE_OPENSSL) */ +#endif /* defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_OPENSSL) */ src/openvpn/ssl_polarssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_POLARSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_POLARSSL )#include "errlevel.h" #include "ssl_backend.h" @@ -243,7 +243,7 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file,#if ENABLE_INLINE_FILES const char *cert_file_inline,#endif -x509_cert_t **x509 +openvpn_x509_cert_t **x509 ) {ASSERT(NULL != ctx);src/openvpn/ssl_polarssl.c +1
-1@@ -270,7 +270,7 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx,const char *cert_file, } void -tls_ctx_free_cert_file (x509_cert_t *x509) +tls_ctx_free_cert_file (openvpn_x509_cert_t *x509) {x509_free (x509 );}
src/openvpn/ssl_polarssl.c +0
-0@@ -332,7 +332,7 @@ tls_ctx_load_priv_file (struct tls_root_ctx *ctx,const char
*priv_key_file
#ifdefMANAGMENT_EXTERNAL_KEYint
-tls_ctx_use_external_private_key (structtls_root_ctx*ctx,x509_cert_t*cert)
+tls_ctx_use_external_private_key (structtls_root_ctx*ctx,openvpn_x509_cert_t*cert)
{
msg(M_FATAL, "Use of management external keys not yet supported forPolarSSL."); return false;src/openvpn/ssl_polarssl.c +1
-1@@ -863,4 +863,4 @@ get_highest_preference_tls_cipher (char *buf, int size) strncpynt (buf, cipher_name, size); } -#endif /* defined(USE_SSL) && defined(USE_POLARSSL) */ +#endif /* defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_POLARSSL) */ src/openvpn/ssl_verify.c +3
-3@@ -29,14 +29,14 @@#include "syshead.h" -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#include "misc.h" #include "manage.h" #include "ssl_verify.h" #include "ssl_verify_backend.h" -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_verify_openssl.h" #endif @@ -296,7 +296,7 @@ print_nsCertType (int type)* @param subject the peer's extracted common name */ static result_t -verify_peer_cert (const struct tls_options *opt,x509_cert_t *peer_cert, +verify_peer_cert (const struct tls_options *opt,openvpn_x509_cert_t *peer_cert,const char *subject,const char *common_name){ /* verify certificate nsCertType */src/openvpn/ssl_verify.c +1
-1@@ -315,7 +315,7 @@ verify_peer_cert(const struct tls_options *opt, x509_cert_t *peer_cert, } } -#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL /* verify certificate ku */ if (opt->remote_cert_ku[0] != 0)src/openvpn/ssl_verify.c +1
-1@@ -369,7 +369,7 @@ verify_peer_cert(const struct tls_options *opt,x509_cert_t *peer_cert, * environment for later verification by scripts and plugins. */ static void -verify_cert_set_env(struct env_set *es, x509_cert_t *peer_cert, int cert_depth, +verify_cert_set_env(struct env_set *es, openvpn_x509_cert_t *peer_cert, int cert_depth,const char *subject, const char
*common_name#ifdef ENABLE_X509_TRACK , const struct x509_track *x509_tracksrc/openvpn/ssl_verify.c +1
-1@@ -425,7 +425,7 @@ verify_cert_set_env(struct env_set *es, x509_cert_t*peer_cert, int cert_depth, */ static result_t verify_cert_call_plugin (const struct plugin_list *plugins,struct env_set *es, -int cert_depth,x509_cert_t *cert,char *subject) +int cert_depth,openvpn_x509_cert_t *cert,char *subject) {if (plugin_defined (plugins, OPENVPN_PLUGIN_TLS_VERIFY)) {src/openvpn/ssl_verify.c +1
-1@@ -454,7 +454,7 @@ verify_cert_call_plugin(const struct plugin_list *plugins, struct env_set *es, }static const char * -verify_cert_export_cert (x509_cert_t *peercert,const char *tmp_dir, struct gc_arena *gc) +verify_cert_export_cert (openvpn_x509_cert_t *peercert,const char *tmp_dir,struct gc_arena *gc){ FILE *peercert_file; const char *peercert_filename="";src/openvpn/ssl_verify.c +0
-0@@ -486,7 +486,7 @@ verify_cert_export_cert(x509_cert_t *peercert,const char
*tmp_dir, structgc_ar
*/
staticresult_t
verify_cert_call_command(const char*verify_command, structenv_set
*es,
- intcert_depth,x509_cert_t*cert, char *subject, const char*verify_export_cert)
+ intcert_depth,openvpn_x509_cert_t*cert, char *subject, const
char*verify_export_cert){ const char *tmp_file = NULL; int ret;src/openvpn/ssl_verify.c +1
-1@@ -533,7 +533,7 @@ verify_cert_call_command(const char*verify_command, struct env_set *es, * check peer cert against CRL directory */ static result_t -verify_check_crl_dir (const char *crl_dir,x509_cert_t *cert) +verify_check_crl_dir (const char *crl_dir,openvpn_x509_cert_t *cert) {char fn[256 ];int fd;src/openvpn/ssl_verify.c +1
-1@@ -560,7 +560,7 @@ verify_check_crl_dir(const char *crl_dir, x509_cert_t *cert) }result_t -verify_cert(struct tls_session *session, x509_cert_t *cert, int cert_depth) +verify_cert (struct tls_session *session,openvpn_x509_cert_t *cert,int cert_depth){ char *subject = NULL; char common_name[TLS_USERNAME_LEN] = {0};src/openvpn/ssl_verify.c +1
-1@@ -1215,4 +1215,4 @@ verify_final_auth_checks(struct tls_multi *multi, struct tls_session *session) gc_free (&gc); } } -#endif /* defined(USE_CRYPTO) && defined(USE_SSL) */ +#endif /* defined(ENABLE_CRYPTO) && defined(ENABLE_SSL) */ src/openvpn/ssl_verify.h +2
-2@@ -36,10 +36,10 @@#include "ssl_common.h" /* Include OpenSSL-specific code */ -#ifdef USE_OPENSSL +#ifdef ENABLE_CRYPTO_OPENSSL #include "ssl_verify_openssl.h" #endif -#ifdef USE_POLARSSL +#ifdef ENABLE_CRYPTO_POLARSSL #include "ssl_verify_polarssl.h" #endif src/openvpn/ssl_verify_backend.h +0
-0@@ -55,7 +55,7 @@ typedef enum { SUCCESS=0, FAILURE=1 } result_t;* * @return \c SUCCESS if verification was successful, \c FAILURE on failure.
*/
-result_tverify_cert(struct tls_session *session, x509_cert_t *cert, int cert_depth);
+result_tverify_cert(struct tls_session *session, openvpn_x509_cert_t *cert, int cert_depth);/*
* Remember the given certificate hash, allowing the certificate chain
to besrc/openvpn/ssl_verify_backend.h +1
-1@@ -86,7 +86,7 @@ void cert_hash_remember (struct tls_session *session,const int cert_depth, * * @return a string containing the subject */ -char *x509_get_subject (x509_cert_t *cert); +char *x509_get_subject (openvpn_x509_cert_t *cert);/* * Free a subject string as returned by \c
verify_get_subject()src/openvpn/ssl_verify_backend.h +0
-0@@ -103,7 +103,7 @@ void x509_free_subject (char *subject);* * @return a string containing the SHA1 hash of the certificate
*/src/openvpn/ssl_verify_backend.h +3
-3-unsigned char *x509_get_sha1_hash (x509_cert_t *cert); +unsigned char *x509_get_sha1_hash (openvpn_x509_cert_t *cert);/* * Free a hash as returned by \c verify_get_hash() @@ -126,7 +126,7 @@ void x509_free_sha1_hash (unsigned char *hash);* @return \c FAILURE, \c or SUCCESS */ result_t x509_get_username (char *common_name,int cn_len, -char * x509_username_field,x509_cert_t *peer_cert); +char * x509_username_field,openvpn_x509_cert_t *peer_cert);/* * Return the certificate's serial number. @@ -138,7 +138,7 @@ result_t x509_get_username (char *common_name, intcn_len, * * @return The certificate's serial number. */ -char *x509_get_serial (x509_cert_t *cert); +char *x509_get_serial (openvpn_x509_cert_t *cert);/* * Free a serial number string as returned by \c
verify_get_serial()src/openvpn/ssl_verify_backend.h +1
-1@@ -156,7 +156,7 @@ void x509_free_serial (char *serial);* @param cert_depth Depth of the certificate * @param cert Certificate to set the environment for */ -void x509_setenv (struct env_set *es,int cert_depth,x509_cert_t *cert); +void x509_setenv (struct env_set *es,int cert_depth,openvpn_x509_cert_t *cert);#ifdef
ENABLE_X509_TRACKsrc/openvpn/ssl_verify_backend.h +1
-1@@ -195,7 +195,7 @@ void x509_track_add (const struct x509_track**ll_head, const char *name, * @param cert Certificate to set the environment for */ void x509_setenv_track (const struct x509_track *xt,struct env_set *es, -const int depth,x509_cert_t *x509); +const int depth,openvpn_x509_cert_t *x509);#endif
src/openvpn/ssl_verify_backend.h +0
-0@@ -210,9 +210,9 @@ void x509_setenv_track (const struct x509_track *xt, struct env_set *es, * the expected bit set. \c FAILURE if the certificatedoes
* not have NS cert type verification or the wrong bit
set.
*/
-result_tx509_verify_ns_cert_type(const x509_cert_t *cert, const int usage);
+result_tx509_verify_ns_cert_type(const openvpn_x509_cert_t *cert, const int usage);src/openvpn/ssl_verify_backend.h +1
-1-#if OPENSSL_VERSION_NUMBER >=0x00907000L ||USE_POLARSSL +#if OPENSSL_VERSION_NUMBER >=0x00907000L ||ENABLE_CRYPTO_POLARSSL /* * Verify X.509 key usage extension field. @@ -224,7 +224,7 @@ result_t x509_verify_ns_cert_type(const x509_cert_t *cert, const int usage); * @return \c SUCCESS if one of the key usage valuesmatches, \c FAILURE
* if key usage is not enabled, or the values do not
match.
*/
-result_tx509_verify_cert_ku(x509_cert_t*x509, const unsigned * constexpected_ku,
+result_tx509_verify_cert_ku(openvpn_x509_cert_t*x509, const unsigned * constexpected_ku,int expected_len);/*
src/openvpn/ssl_verify_backend.h +0
-0@@ -240,7 +240,7 @@ result_t x509_verify_cert_ku (x509_cert_t *x509,const unsigned * const expected
* extended key usage fields, \c FAILURE if extended key
* usage is not enabled, or the values do not match.
*/
-result_tx509_verify_cert_eku(x509_cert_t*x509, const char * constexpected_oid);
+result_tx509_verify_cert_eku(openvpn_x509_cert_t*x509, const char * constexpected_oid);#endif
src/openvpn/ssl_verify_backend.h +0
-0@@ -253,7 +253,7 @@ result_t x509_verify_cert_eku (x509_cert_t *x509,const char * const
expected_oi
*
*
*/src/openvpn/ssl_verify_backend.h +1
-1-result_t x509_write_pem (FILE *peercert_file,x509_cert_t *peercert); +result_t x509_write_pem(FILE *peercert_file, openvpn_x509_cert_t*peercert);
/*
* Check the certificate against a CRL file.src/openvpn/ssl_verify_backend.h +1
-1@@ -266,7 +266,7 @@ result_t x509_write_pem(FILE *peercert_file,x509_cert_t *peercert); * certificate or does not contain an entry for it. * \c FAILURE otherwise. */ -result_t x509_verify_crl (const char *crl_file,x509_cert_t *cert, +result_t x509_verify_crl (const char *crl_file,openvpn_x509_cert_t *cert,const char *subject);#endif /*
SSL_VERIFY_BACKEND_H_*/src/openvpn/ssl_verify_openssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_OPENSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_OPENSSL )#include "ssl_verify.h" #include "ssl_verify_backend.h" @@ -210,7 +210,7 @@ x509_get_username (char *common_name, int cn_len, }char * -x509_get_serial (x509_cert_t *cert) +x509_get_serial (openvpn_x509_cert_t *cert) {ASN1_INTEGER *asn1_i;BIGNUM *bignum;@@ -401,7 +401,7 @@ x509_setenv_track (const struct x509_track *xt,struct
env_set*es, const int de
* X509_{cert_depth}_{name}={value}
*/
void
-x509_setenv (structenv_set*es, intcert_depth,x509_cert_t*peer_cert)
+x509_setenv (structenv_set*es, intcert_depth,openvpn_x509_cert_t*peer_cert){ int i, n; int fn_nid;src/openvpn/ssl_verify_openssl.c +1
-1@@ -449,7 +449,7 @@ x509_setenv (struct env_set *es, int cert_depth, x509_cert_t *peer_cert) }result_t -x509_verify_ns_cert_type(const x509_cert_t *peer_cert, const int usage) +x509_verify_ns_cert_type (const openvpn_x509_cert_t *peer_cert,const int usage){ if (usage == NS_CERT_CHECK_NONE) return SUCCESS;src/openvpn/ssl_verify_openssl.c +1
-1@@ -623,4 +623,4 @@ end: return retval; } -#endif /* defined(USE_SSL) && defined(USE_OPENSSL) */ +#endif /* defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_OPENSSL) */ src/openvpn/ssl_verify_openssl.h +5
-1@@ -32,7 +32,11 @@#define SSL_VERIFY_OPENSSL_H_ #include <openssl/x509.h> -typedef X509 x509_cert_t ; + +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef X509 openvpn_x509_cert_t ; +#endif /** @name Function for authenticating a new connection from a remote OpenVPN peer
* @{ */src/openvpn/ssl_verify_polarssl.c +2
-2@@ -29,7 +29,7 @@#include "syshead.h" -#if defined(USE_SSL ) && defined(USE_POLARSSL ) +#if defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_POLARSSL )#include "ssl_verify.h" #include <polarssl/sha1.h> @@ -189,7 +189,7 @@ x509_free_subject (char *subject)* X509_{cert_depth}_{name}={value} */ void -x509_setenv (struct env_set *es,int cert_depth,x509_cert_t *cert) +x509_setenv (struct env_set *es,int cert_depth,openvpn_x509_cert_t *cert) {int i;unsigned char c;src/openvpn/ssl_verify_polarssl.c +1
-1@@ -422,4 +422,4 @@ end: return retval; } -#endif /* #if defined(USE_SSL) && defined(USE_POLARSSL) */ +#endif /* #if defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_POLARSSL) */
src/openvpn/ssl_verify_polarssl.h +4
-1@@ -35,7 +35,10 @@#include "manage.h" #include <polarssl/x509.h> -typedef x509_cert x509_cert_t ; +#ifndef __OPENVPN_X509_CERT_T_DECLARED +#define __OPENVPN_X509_CERT_T_DECLARED +typedef x509_cert openvpn_x509_cert_t ; +#endif /** @name Function for authenticating a new connection from a remote OpenVPN peer
* @{ */src/openvpn/syshead.h +1
-1@@ -479,7 +479,7 @@ socket_defined (const socket_descriptor_t sd)* Do we have point-to-multipoint capability? */ -#if defined(ENABLE_CLIENT_SERVER ) && defined(USE_CRYPTO ) && defined(USE_SSL) && defined(HAVE_GETTIMEOFDAY) +#if defined(ENABLE_CLIENT_SERVER ) && defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && defined(HAVE_GETTIMEOFDAY )#define P2MP 1#else
#define P2MP 0src/openvpn/syshead.h +1
-1@@ -516,7 +516,7 @@ socket_defined (const socket_descriptor_t sd)/* * Enable external private key */ -#if defined(ENABLE_MANAGEMENT ) && defined(USE_SSL ) && !defined(USE_POLARSSL) +#if defined(ENABLE_MANAGEMENT ) && defined(ENABLE_SSL ) && !defined(ENABLE_CRYPTO_POLARSSL )#define MANAGMENT_EXTERNAL_KEY #endif
src/openvpn/syshead.h +4
-4@@ -565,7 +565,7 @@ socket_defined (const socket_descriptor_t sd)/* * Should we include NTLM proxy functionality */ -#if defined(USE_CRYPTO ) && defined(ENABLE_HTTP_PROXY ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_HTTP_PROXY )#define NTLM 1#else #define NTLM 0@@ -574,7 +574,7 @@ socket_defined (const socket_descriptor_t sd)/* * Should we include proxy digest auth functionality */ -#if defined(USE_CRYPTO ) && defined(ENABLE_HTTP_PROXY ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_HTTP_PROXY )#define PROXY_DIGEST_AUTH 1#else #define PROXY_DIGEST_AUTH 0@@ -590,14 +590,14 @@ socket_defined (const socket_descriptor_t sd)/* * Do we have CryptoAPI capability? */ -#if defined(WIN32 ) && defined(USE_CRYPTO ) && defined(USE_SSL ) && defined(USE_OPENSSL) +#if defined(WIN32 ) && defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && defined(ENABLE_CRYPTO_OPENSSL )#define ENABLE_CRYPTOAPI #endif /* * Enable x509-track feature? */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) && defined (USE_OPENSSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL ) && defined (ENABLE_CRYPTO_OPENSSL )#define
ENABLE_X509_TRACK
#endifsrc/openvpn/syshead.h +1
-1@@ -688,7 +688,7 @@ socket_defined (const socket_descriptor_t sd)/* * Do we support pushing peer info? */ -#if defined(USE_CRYPTO ) && defined(USE_SSL ) +#if defined(ENABLE_CRYPTO ) && defined(ENABLE_SSL )#define ENABLE_PUSH_PEER_INFO #endif src/plugins/examples/log_v3.c +1
-4@@ -36,9 +36,7 @@#include <string.h> #include <stdlib.h> -#define USE_SSL -#define USE_OPENSSL -#include "ssl_verify_openssl.h" +#define ENABLE_SSL #include "openvpn-plugin.h" --1.7.3.4
-----------------------------------------------------------------------
-------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH 03/35] cleanup: tun.c: fix incorrect option in message (ip-win32)
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 11 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...>--- tun.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)tun.c +0
-0
tun.c dhcp_masq_addr (const in_addr_t local, const in_addr_t netmask, const int offset · line 4498
Quoted 8 lines
tun.c +1
-1@@ -4492,7 +4492,7 @@ dhcp_masq_addr (const in_addr_t local, const in_addr_t netmask, const int offsetmsg (M_FATAL ,"ERROR: There is a clash between the --ifconfig local address and the internal DHCP server address -- both are set to %s -- please use the --ip-win32 dynamic option to choose a different free address from the --ifconfig subnet for the internal DHCP server" ,print_in_addr_t (dsa,0 , &gc));if ((local & netmask) != (dsa & netmask)) -msg (M_FATAL ,"ERROR: --tap-win32 dynamic [offset] : offset is outside of --ifconfig subnet" ); +msg (M_FATAL ,"ERROR: --ip-win32 dynamic [offset] : offset is outside of --ifconfig subnet" );gc_free (&gc);return htonl (dsa);
ACK.
Kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRJEACgkQDC186MBRfrpufwCaApTJnlpQQJ9iWW3PBh+sJCxo 0TIAn1j4gSvEM7GiwuVhep7q/yELWcuf
=F7DR
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 04/35] cleanup: memcmp.c: remove unused source
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 27 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- configure.ac |3 ---
memcmp.c| 43 -------------------------------------------2 files changed, 0 insertions(+), 46 deletions(-) delete mode 100644
memcmp.cconfigure.ac index 25dcc37..1c4d66c renamed from configure.ac +0
-0100644 --- a/configure.ac +++ b/configure.ac @@ -564,9 +564,6 @@ else
fi
-dnl Required library functions -AC_FUNC_MEMCMP - dnl dnl Check for
res_initdnl diff --gita/memcmp.cb/memcmp.cdeleted file mode 100644 index d921aac..0000000 ---a/memcmp.c+++/dev/null@@ -1,43 +0,0 @@ -/* - * OpenVPN -- An application to securely tunnel IP
networks - * over a single TCP/UDP port, with support for
SSL/TLS-based - * session authentication and key
exchange, - * packet encryption, packet authentication,
and - * packet compression. - * - * Copyright (C)
2002-2010 OpenVPN Technologies, Inc. <[email protected]...> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of
Quoted 8 lines
the GNU General Public License - * along with this program (see the file COPYING included with this - * distribution); if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "
syshead.h" - -#include "memdbg.h" - -int -memcmp (const void *s1, const void *s2,size_tn) -{ - unsigned const char *p1 = s1, *p2 = s2; - int d; - - if (n) -
while (n-- > 0) - { - d = *p1++ - *p2++; - if (d != 0) - return
d; - } - return 0; -}
ACK.
Kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRPAACgkQDC186MBRfrryIgCfZey8UxGKJWZRtLOcAnwyE4Ew nB0AoKFQCqaIam9Wb37VlP07dushqYqs
=CVAz
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 05/35] build: correct place to alter WINVER is at build system
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 29 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- configure.ac| 2 +-
syshead.h| 4 ---- win/msvc.mak.in | 2 +- 3
files changed, 2 insertions(+), 6 deletions(-)configure.ac index 1c4d66c..aa1d509 renamed from configure.ac +0
-0100644 --- a/configure.ac +++ b/configure.ac @@ -342,7 +342,7 @@ case "$host" in ;; *-mingw*) AC_DEFINE(TARGET_WIN32, 1, [Are we running
WIN32?]) - CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN" +
CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501"OPENVPN_ADD_LIBS(-lgdi32)OPENVPN_ADD_LIBS(-lws2_32)OPENVPN_ADD_LIBS(-lwininet)diff --gita/syshead.hb/syshead.hindex 0235abd..e8e70d2 100644 ---a/syshead.h+++b/syshead.h@@ -28,10 +28,6 @@ /* * Only include if not during configure */ -#ifdef WIN32 -/*PF_INET6: win32 ipv6 exists only after0x0501(XP) */ -#define WINVER0x0501-#endif #ifndefPACKAGE_NAME#include "config.h" #include "compat.h" diff --git a/win/msvc.mak.in b/win/msvc.mak.in index 191f370..43c3335 100644 --- a/win/msvc.mak.in +++ b/win/msvc.mak.in @@ -38,7 +38,7 @@LIB_DIRS= -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(POLARSSL)\build\library -LIBPATH:$ EXE = openvpn.exeCPP=cl.exe -CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN
configure.ac index 1c4d66c..aa1d509 renamed from configure.ac +0
-2-D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS $(INCLUDE_DIRS)/FD /c +CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN
configure.ac index 1c4d66c..aa1d509 renamed from configure.ac +0
-2-DWINVER=0x0501 -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS $(INCLUDE_DIRS)/FD /c
Quoted 2 lines
LINK32=link.exe
ACK.
Kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRT4ACgkQDC186MBRfroHHwCfRYRV4pvQvDbGIYO8ODj2rU8i 0H4AniwZ45kaq/lG5W/1QGxj7UT7uE2b
=9b4K
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 06/35] Update .gitignore
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 7 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- .gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-)
.gitignore index 3d12f5d..8cc07de 100644 --- renamed from .gitignore +0
-0a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.obj *.pyc *.so +*~ .deps
MakefileMakefile.in
ACK.
Kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRUYACgkQDC186MBRfroV+wCglSwC6DGYbaMFnX8UM1z5rUj5 7dsAn3z7mYskOnLVfsALjIs6DE3U2RMA
=Z3OF
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 07/35] build: tests do not work disable
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 12 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
Makefile.am index 26b80f3..f96eb45 100644 renamed from Makefile.am +0
-1--- a/Makefile.am +++ b/Makefile.am @@ -57,16 +57,17 @@ SUBDIRS = \service-win32 \ install-win32
-TESTS =
t_client.sht_lpback.sht_cltsrv.sh+test_scripts =t_client.sht_lpback.sht_cltsrv.sh+#TESTS = $(test_scripts)sbin_PROGRAMS= openvpn
Quoted 6 lines
dist_doc_DATA= \management/management-notes.txt
dist_noinst_SCRIPTS= \ - $(TESTS) \ doclean \ domake-win \ +
$(test_scripts) \t_cltsrv-down.sh\ configure_h.awk configure_log.awk
Which of these tests are not working? And how do they fail?
I'm running 'make check' before pushing a new git tree, and it passes fine for me. The only "exception" is t_client.sh (generated via t_client.sh.in) which depends on a configuration file (t_client.rc) - otherwise it is just skipped. This test is however run in our buildbot farm, AFAIR. Gert also runs this test in his development repos. So it's rather odd to hear that these tests fail.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LRl4ACgkQDC186MBRfrrWcQCgklcEZ8ATjLQqsQ9mxOFLbMjM 2FAAoI2cJAVd7GVdv9hO7TvkSSVCAPmK
=xG/s
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 08/35] build: handle printf style format in mingw
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 91 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...>--- buffer.h | 12 ++++++++++-- error.h | 6 +++++- misc.h | 12 ++++++++++-- status.h | 6 +++++- 4 files changed, 30 insertions(+), 6 deletions(-)buffer.h +10
-2@@ -312,7 +312,11 @@ has_digit (const unsigned char* src)*/ bool buf_printf (struct buffer *buf, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;@@ -326,7 +330,11 @@ bool buf_puts (struct buffer *buf, const char *str);*/ bool openvpn_snprintf(char *str, size_t size, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 3, 4))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 3, 4))) +#else + __attribute__ ((format (__printf__, 3, 4))) +#endif #endif ;error.h +5
-1@@ -178,7 +178,11 @@ bool dont_mute (unsigned int flags); /* check muting filter */ void x_msg (const unsigned int flags, const char *format, ...)#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;/* should be called via msg above */ misc.h +10
-2@@ -435,13 +435,21 @@ void argv_printf_arglist (struct argv *a, const char *format, const unsigned int void argv_printf (struct argv *a, const char *format, ...) #ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ; void argv_printf_cat (struct argv *a, const char *format, ...) #ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;status.h +0
-0@@ -77,7 +77,11 @@ void status_flush (struct status_output *so);bool status_close (struct status_output *so);void status_printf (struct status_output *so,const char *format, ...)
status.h void status_flush (struct status_output *so); · line 87
Quoted 10 lines
status.h +5
-1#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))) +#if __USE_MINGW_ANSI_STDIO + __attribute__ ((format (gnu_printf, 2, 3))) +#else + __attribute__ ((format (__printf__, 2, 3))) +#endif #endif ;
ACK!
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LSM0ACgkQDC186MBRfrqI/QCePqdjVuyvhqEBEXcJb8IHaoBr dL4AoJnbRxUayMqsg17JgTb5CcQ1FsIV
=S8gc
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 09/35] build: rename plugin directory to plugins
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 59 lines · Alon Bar-Lev
This to avoid conflit with
plugin.crulesSigned-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am| 3 +- plugin/README | 47 --- plugin/auth-pam/.svnignore | 1 - plugin/auth-pam/Makefile | 30 -- plugin/auth-pam/README | 74 ---- plugin/auth-pam/auth-pam.c | 804 ----------------------------------------- plugin/auth-pam/pamdl.c | 180 --------- plugin/auth-pam/pamdl.h | 7 - plugin/defer/README | 16 - plugin/defer/build | 14 - plugin/defer/simple.c | 305 ---------------- plugin/defer/simple.def | 6 - plugin/defer/winbuild | 18 - plugin/down-root/Makefile | 17 - plugin/down-root/README | 29 -- plugin/down-root/down-root.c | 553 ---------------------------- plugin/examples/README | 16 - plugin/examples/build | 14 - plugin/examples/log.c | 184 ---------- plugin/examples/log_v3.c | 249 ------------- plugin/examples/simple.c | 120 ------ plugin/examples/simple.def | 6 - plugin/examples/winbuild | 18 - plugins/README | 47 +++ plugins/auth-pam/.svnignore | 1 + plugins/auth-pam/Makefile | 30 ++ plugins/auth-pam/README | 74 ++++ plugins/auth-pam/auth-pam.c | 804 +++++++++++++++++++++++++++++++++++++++++ plugins/auth-pam/pamdl.c | 180 +++++++++ plugins/auth-pam/pamdl.h | 7 + plugins/defer/README | 16 + plugins/defer/build | 14 + plugins/defer/simple.c | 305 ++++++++++++++++ plugins/defer/simple.def | 6 + plugins/defer/winbuild | 18 + plugins/down-root/Makefile | 17 + plugins/down-root/README | 29 ++ plugins/down-root/down-root.c | 553 ++++++++++++++++++++++++++++ plugins/examples/README | 16 + plugins/examples/build | 14 + plugins/examples/log.c | 184 ++++++++++ plugins/examples/log_v3.c | 249 +++++++++++++ plugins/examples/simple.c | 120 ++++++ plugins/examples/simple.def | 6 + plugins/examples/winbuild |18 + 45 files changed, 2709 insertions(+), 2710 deletions(-) delete mode 100644 plugin/README delete mode 100644 plugin/auth-pam/.svnignore delete mode 100755 plugin/auth-pam/Makefile delete mode 100644 plugin/auth-pam/README delete mode 100644
plugin/auth-pam/auth-pam.cdelete mode 100644plugin/auth-pam/pamdl.cdelete mode 100644plugin/auth-pam/pamdl.hdelete mode 100644 plugin/defer/README delete mode 100755 plugin/defer/build delete mode 100644plugin/defer/simple.cdelete mode 100755 plugin/defer/simple.def delete mode 100755 plugin/defer/winbuild delete mode 100755 plugin/down-root/Makefile delete mode 100644 plugin/down-root/README delete mode 100644plugin/down-root/down-root.cdelete mode 100644 plugin/examples/README delete mode 100755 plugin/examples/build delete mode 100644plugin/examples/log.cdelete mode 100644plugin/examples/log_v3.cdelete mode 100644plugin/examples/simple.cdelete mode 100755 plugin/examples/simple.def delete mode 100755 plugin/examples/winbuild create mode 100644 plugins/README create mode 100644 plugins/auth-pam/.svnignore create mode 100755 plugins/auth-pam/Makefile create mode 100644 plugins/auth-pam/README create mode 100644plugins/auth-pam/auth-pam.ccreate mode 100644plugins/auth-pam/pamdl.ccreate mode 100644plugins/auth-pam/pamdl.hcreate mode 100644 plugins/defer/README create mode 100755 plugins/defer/build create mode 100644plugins/defer/simple.ccreate mode 100755 plugins/defer/simple.def create mode 100755 plugins/defer/winbuild create mode 100755 plugins/down-root/Makefile
Quoted 8 lines
create mode 100644 plugins/down-root/README create mode 100644
plugins/down-root/down-root.ccreate mode 100644 plugins/examples/README create mode 100755 plugins/examples/build create mode 100644plugins/examples/log.ccreate mode 100644plugins/examples/log_v3.ccreate mode 100644plugins/examples/simple.ccreate mode 100755 plugins/examples/simple.def create mode 100755 plugins/examples/winbuild
ACK. I've not checked that files are not modified, but will check that more carefully when it is pulled into the tree.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LSWIACgkQDC186MBRfrofjACcDmONwrtbSxSR1kAqGA2QHVjn 6IQAni6jfx/gPtGsv1ousJKaj84XAICP
=NvNR
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 10/35] build: plugins: properly use CFLAGS and LDFLAGS
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 65 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> ---plugins/auth-pam/Makefile | 9 +++++---- plugins/defer/build
| 6 +++--- plugins/down-root/Makefile | 6 +++--- plugins/examples/build | 6 +++--- 4 files changed, 14insertions(+), 13 deletions(-)
plugins/auth-pam/Makefile +0
-0b/plugins/auth-pam/Makefile @@ -15,16 +15,17 @@ endif # This directory is where we will look for
openvpn-plugin.hINCLUDE=-I../..-CC_FLAGS=-O2 -Wall -DDLOPEN_PAM=$(DLOPEN_PAM) +CFLAGS=-O2 -Wall +DEFS = -DDLOPEN_PAM=$(DLOPEN_PAM)
openvpn-auth-pam.so : auth-pam.o pamdl.o - gcc ${CC_FLAGS} -fPIC
-shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so
auth-pam.o pamdl.o -lc $(LIBPAM) + gcc $(CFLAGS) -fPIC -shared
$(LDFLAGS) -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.o pamdl.o -lc $(LIBPAM)auth-pam.o :
auth-pam.cpamdl.h- gcc ${CC_FLAGS} -fPIC -c ${INCLUDE}auth-pam.c+ gcc $(CFLAGS) $(DEFS) -fPIC -c $(INCLUDE)auth-pam.cpamdl.o :
pamdl.cpamdl.h- gcc ${CC_FLAGS} -fPIC -c ${INCLUDE}pamdl.c+ gcc $(CFLAGS) $(DEFS) -fPIC -c $(INCLUDE)pamdl.cclean : rm -f *.o *.so diff --git a/plugins/defer/build b/plugins/defer/build index 5907afa..cb650f3 100755 --- a/plugins/defer/build +++ b/plugins/defer/build @@ -8,7 +8,7 @@ # This directory is where we will look for
openvpn-plugin.hINCLUDE="-I../.."plugins/auth-pam/Makefile +0
-3-CC_FLAGS="-O2 -Wall -g" +CFLAGS="${CFLAGS:--O2 -Wall -g}" -gcc $CC_FLAGS -fPIC -c $INCLUDE $1.c && \ -gcc $CC_FLAGS -fPIC -shared -Wl,-soname,$1.so -o $1.so $1.o -lc +gcc $CFLAGS -fPIC -c$INCLUDE $1.c && \ +gcc $CFLAGS -fPIC -shared $LDFLAGS -Wl,-soname,$1.so -o $1.so $1.o -lc diff --git a/plugins/down-root/Makefile b/plugins/down-root/Makefile index 5ce4ffb..f8a183c 100755 --- a/plugins/down-root/Makefile +++ b/plugins/down-root/Makefile @@ -5,13 +5,13 @@ # This directory is where we will look for
openvpn-plugin.hINCLUDE=-I../..-CC_FLAGS=-O2 -Wall +CFLAGS=-O2 -Wall
down-root.so : down-root.o - gcc ${CC_FLAGS} -fPIC -shared
plugins/auth-pam/Makefile +0
-4-Wl,-soname,openvpn-down-root.so -o openvpn-down-root.so down-root.o -lc + gcc $(CFLAGS) -fPIC -shared $(LDFLAGS) -Wl,-soname,openvpn-down-root.so -o openvpn-down-root.so down-root.o -lcdown-root.o :
down-root.c- gcc ${CC_FLAGS} -fPIC -c ${INCLUDE}down-root.c+ gcc $(CFLAGS) -fPIC -c $(INCLUDE)down-root.cclean : rm -f *.o *.so diff --git a/plugins/examples/build b/plugins/examples/build index 5907afa..93e1936 100755 --- a/plugins/examples/build +++ b/plugins/examples/build @@ -8,7 +8,7 @@ # This directory is where we will look for
openvpn-plugin.hINCLUDE="-I../.."plugins/auth-pam/Makefile +0
-3-CC_FLAGS="-O2 -Wall -g" +CFLAGS="${CFLAGS:--O2 -Wall -g}" -gcc $CC_FLAGS -fPIC -c $INCLUDE $1.c && \ -gcc $CC_FLAGS -fPIC -shared -Wl,-soname,$1.so -o $1.so $1.o -lc +gcc $CFLAGS -fPIC -c
Quoted 2 lines
$INCLUDE $1.c && \ +gcc $CFLAGS -fPIC -shared ${LDFLAS} -Wl,-soname,$1.so -o $1.so $1.o -lc
ACK.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LSZMACgkQDC186MBRfrrtNgCgkEkksNlbExJPBynVkEXn5QNA 9RQAoIX4+5mbNoeKXlVKjE1qBlRrNLrv
=yG8v
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 11/35] Remove install-win32
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 50 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am| 5 +- configure.ac | 3 - images/.svnignore | 2 - images/Makefile.am | 41 -- images/icon.ico | Bin 22486 -> 0 bytes images/install-whirl.bmp | Bin 25820 -> 0 bytes install-win32/.svnignore | 4 - install-win32/GetWindowsVersion.nsi | 109 ---- install-win32/Makefile.am | 97 ---- install-win32/build-pkcs11-helper.sh | 24 - install-win32/buildinstaller | 14 - install-win32/ddk-common | 2 - install-win32/doclean | 6 - install-win32/dosname.pl | 9 - install-win32/getgui | 19 - install-win32/getopenssl | 19 - install-win32/getpkcs11helper | 17 - install-win32/getprebuilt | 10 - install-win32/getxgui | 28 - install-win32/ifdef.pl | 53 -- install-win32/m4todef.pl | 15 - install-win32/macro.pl | 61 --- install-win32/makeopenvpn | 67 --- install-win32/maketap | 17 - install-win32/maketapinstall | 15 - install-win32/maketext | 59 --- install-win32/openssl/README.txt | 21 - install-win32/openssl/openssl097.patch | 68 --- install-win32/openssl/openssl098.patch | 56 -- install-win32/openvpn.nsi | 886 -------------------------------- install-win32/sample.ovpn | 103 ---- install-win32/setpath.nsi | 231 --------- install-win32/settings.in | 71 --- install-win32/trans.pl | 97 ---- install-win32/u2d.c | 20 - install-win32/winconfig | 18 - 36 fileschanged, 1 insertions(+), 2266 deletions(-) delete mode 100644 images/.svnignore delete mode 100644 images/Makefile.am delete mode 100755 images/icon.ico delete mode 100755 images/install-whirl.bmp delete mode 100644 install-win32/.svnignore delete mode 100644 install-win32/GetWindowsVersion.nsi delete mode 100644 install-win32/Makefile.am delete mode 100644
install-win32/build-pkcs11-helper.shdelete mode 100644 install-win32/buildinstaller delete mode 100644 install-win32/ddk-common delete mode 100644 install-win32/doclean delete mode 100644install-win32/dosname.pldelete mode 100644 install-win32/getgui delete mode 100644 install-win32/getopenssl delete mode 100644 install-win32/getpkcs11helper delete mode 100644 install-win32/getprebuilt delete mode 100644 install-win32/getxgui delete mode 100644install-win32/ifdef.pldelete mode 100644install-win32/m4todef.pldelete mode 100644install-win32/macro.pldelete mode 100755 install-win32/makeopenvpn delete mode 100644 install-win32/maketap delete mode 100644 install-win32/maketapinstall delete mode 100644 install-win32/maketext delete mode 100644install-win32/openssl/README.txtdelete mode 100644
Quoted 9 lines
install-win32/openssl/openssl097.patchdelete mode 100644install-win32/openssl/openssl098.patchdelete mode 100755 install-win32/openvpn.nsi delete mode 100755 install-win32/sample.ovpn delete mode 100755 install-win32/setpath.nsi delete mode 100644 install-win32/settings.in delete mode 100644install-win32/trans.pldelete mode 100755install-win32/u2d.cdelete mode 100644 install-win32/winconfig
ACK.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LScAACgkQDC186MBRfro64ACgr7fZ80f+F23iB2JNciD4JMIp nkAAn2h4cQv4VEMrahmUqSe/O9D3vRgu
=dqKf
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 12/35] Remove easy-rsa
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 91 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am| 1 - easy-rsa/1.0/README | 161 ------------ easy-rsa/1.0/build-ca | 13 - easy-rsa/1.0/build-dh | 12 - easy-rsa/1.0/build-inter | 19 -- easy-rsa/1.0/build-key | 20 -- easy-rsa/1.0/build-key-pass | 20 -- easy-rsa/1.0/build-key-pkcs12 | 21 -- easy-rsa/1.0/build-key-server | 22 -- easy-rsa/1.0/build-req | 18 -- easy-rsa/1.0/build-req-pass | 18 -- easy-rsa/1.0/clean-all | 19 -- easy-rsa/1.0/list-crl | 18 -- easy-rsa/1.0/make-crl | 18 -- easy-rsa/1.0/openssl.cnf | 255 ------------------- easy-rsa/1.0/revoke-crt | 18 -- easy-rsa/1.0/revoke-full | 29 --- easy-rsa/1.0/sign-req | 18 -- easy-rsa/1.0/vars | 49 ---- easy-rsa/2.0/Makefile | 13 - easy-rsa/2.0/README | 229 ----------------- easy-rsa/2.0/build-ca | 8 - easy-rsa/2.0/build-dh | 11 - easy-rsa/2.0/build-inter | 7 - easy-rsa/2.0/build-key | 7 - easy-rsa/2.0/build-key-pass | 7 - easy-rsa/2.0/build-key-pkcs12 | 8 - easy-rsa/2.0/build-key-server | 10 - easy-rsa/2.0/build-req | 7 - easy-rsa/2.0/build-req-pass | 7 - easy-rsa/2.0/clean-all | 16 -- easy-rsa/2.0/inherit-inter | 39 --- easy-rsa/2.0/list-crl | 13 - easy-rsa/2.0/openssl-0.9.6.cnf | 265 ------------------- easy-rsa/2.0/openssl-0.9.8.cnf | 290 --------------------- easy-rsa/2.0/openssl-1.0.0.cnf | 285 --------------------- easy-rsa/2.0/pkitool | 379 ---------------------------- easy-rsa/2.0/revoke-full | 40 --- easy-rsa/2.0/sign-req | 7 - easy-rsa/2.0/vars | 74 ------ easy-rsa/2.0/whichopensslcnf | 26 -- easy-rsa/Windows/README.txt | 44 ---- easy-rsa/Windows/build-ca-pass.bat | 8 - easy-rsa/Windows/build-ca.bat | 4 - easy-rsa/Windows/build-dh.bat | 4 - easy-rsa/Windows/build-key-pass.bat | 8 - easy-rsa/Windows/build-key-pkcs12.bat | 10 - easy-rsa/Windows/build-key-server-pass.bat | 8 - easy-rsa/Windows/build-key-server.bat | 8 - easy-rsa/Windows/build-key.bat | 8 - easy-rsa/Windows/clean-all.bat | 13 - easy-rsa/Windows/init-config.bat | 1 - easy-rsa/Windows/revoke-full.bat | 13 - easy-rsa/Windows/serial.start | 1 - easy-rsa/Windows/vars.bat.sample | 40 --- 55 fileschanged, 0 insertions(+), 2667 deletions(-) delete mode 100644 easy-rsa/1.0/README delete mode 100755 easy-rsa/1.0/build-ca delete mode 100755 easy-rsa/1.0/build-dh delete mode 100755 easy-rsa/1.0/build-inter delete mode 100755 easy-rsa/1.0/build-key delete mode 100755 easy-rsa/1.0/build-key-pass delete mode 100755 easy-rsa/1.0/build-key-pkcs12 delete mode 100755 easy-rsa/1.0/build-key-server delete mode 100755 easy-rsa/1.0/build-req delete mode 100755 easy-rsa/1.0/build-req-pass delete mode 100755 easy-rsa/1.0/clean-all delete mode 100644 easy-rsa/1.0/list-crl delete mode 100644 easy-rsa/1.0/make-crl delete mode 100644 easy-rsa/1.0/openssl.cnf delete mode 100644 easy-rsa/1.0/revoke-crt delete mode 100755 easy-rsa/1.0/revoke-full delete mode 100755 easy-rsa/1.0/sign-req delete mode 100644 easy-rsa/1.0/vars delete mode 100644 easy-rsa/2.0/Makefile delete mode 100644 easy-rsa/2.0/README delete mode 100755 easy-rsa/2.0/build-ca delete mode 100755 easy-rsa/2.0/build-dh delete mode 100755 easy-rsa/2.0/build-inter delete mode 100755 easy-rsa/2.0/build-key delete mode 100755 easy-rsa/2.0/build-key-pass delete mode 100755 easy-rsa/2.0/build-key-pkcs12 delete mode 100755 easy-rsa/2.0/build-key-server delete mode 100755 easy-rsa/2.0/build-req delete mode 100755 easy-rsa/2.0/build-req-pass delete mode 100755 easy-rsa/2.0/clean-all delete mode 100755 easy-rsa/2.0/inherit-inter delete mode 100755 easy-rsa/2.0/list-crl delete mode 100755 easy-rsa/2.0/openssl-0.9.6.cnf delete mode 100755 easy-rsa/2.0/openssl-0.9.8.cnf delete mode 100755 easy-rsa/2.0/openssl-1.0.0.cnf delete mode 100755 easy-rsa/2.0/pkitool delete mode 100755 easy-rsa/2.0/revoke-full delete mode 100755 easy-rsa/2.0/sign-req delete mode 100755 easy-rsa/2.0/vars delete mode 100755 easy-rsa/2.0/whichopensslcnf delete mode 100644
easy-rsa/Windows/README.txtdelete mode 100644 easy-rsa/Windows/build-ca-pass.bat delete mode 100644 easy-rsa/Windows/build-ca.bat delete mode 100644 easy-rsa/Windows/build-dh.bat delete mode 100644 easy-rsa/Windows/build-key-pass.bat delete mode 100644 easy-rsa/Windows/build-key-pkcs12.bat delete mode 100644 easy-rsa/Windows/build-key-server-pass.bat delete mode 100644
Quoted 9 lines
easy-rsa/Windows/build-key-server.bat delete mode 100644 easy-rsa/Windows/build-key.bat delete mode 100644 easy-rsa/Windows/clean-all.bat delete mode 100644 easy-rsa/Windows/index.txt.start delete mode 100755 easy-rsa/Windows/init-config.bat delete mode 100644 easy-rsa/Windows/revoke-full.bat delete mode 100644 easy-rsa/Windows/serial.start delete mode 100644 easy-rsa/Windows/vars.bat.sample
ACK. These files will be pulled into a separate git repository, so this makes a lot of sense.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LSgwACgkQDC186MBRfroViQCfR+t1pZJJ6lF6Ge82YtOgeaMB 6s4AoJz+q60torElpk/vNw5Z6846Mqxk
=o2nV
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 13/35] Remove tap-win32
In reply to Alon Bar-Lev-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 21 lines · Alon Bar-Lev
Introduce
tap-win32.hwhich is modifiedtap-win32/common.h. Except of function rename, it is the same without thetap_id. This file should be provided as part of tap-win32 MSI. For now we hold a copy.Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am| 3 +- configure.ac | 14 +- tap-win32/MAKEFILE | 6 - tap-win32/SOURCES.in | 64 - tap-win32/common.h | 82 -- tap-win32/constants.h | 52 - tap-win32/dhcp.c | 599 -------- tap-win32/dhcp.h | 164 --- tap-win32/endian.h | 35 - tap-win32/error.c | 378 ----- tap-win32/error.h | 88 -- tap-win32/hexdump.c | 69 - tap-win32/hexdump.h | 63 - tap-win32/i386/OemWin2k.inf.in | 195 --- tap-win32/instance.c | 241 --- tap-win32/lock.h | 75 - tap-win32/macinfo.c | 154 -- tap-win32/macinfo.h | 38 - tap-win32/mem.c | 186 --- tap-win32/proto.h | 224 --- tap-win32/prototypes.h | 260 ---- tap-win32/resource.rc | 58 - tap-win32/tapdrvr.c | 3146 ---------------------------------------- tap-win32/types.h | 178 --- tap-windows.h | 68 + tun.h | 2 +- win/autodefs.h.in | 2 +- 27 files changed,
Quoted 15 lines
78 insertions(+), 6366 deletions(-) delete mode 100755 tap-win32/MAKEFILE delete mode 100755 tap-win32/SOURCES.in delete mode 100755
tap-win32/common.hdelete mode 100755tap-win32/constants.hdelete mode 100755tap-win32/dhcp.cdelete mode 100755tap-win32/dhcp.hdelete mode 100755tap-win32/endian.hdelete mode 100755tap-win32/error.cdelete mode 100755tap-win32/error.hdelete mode 100755tap-win32/hexdump.cdelete mode 100755tap-win32/hexdump.hdelete mode 100755 tap-win32/i386/OemWin2k.inf.in delete mode 100755tap-win32/instance.cdelete mode 100755tap-win32/lock.hdelete mode 100755tap-win32/macinfo.cdelete mode 100755tap-win32/macinfo.hdelete mode 100755tap-win32/mem.cdelete mode 100755tap-win32/proto.hdelete mode 100755tap-win32/prototypes.hdelete mode 100755 tap-win32/resource.rc delete mode 100755tap-win32/tapdrvr.cdelete mode 100755tap-win32/types.hcreate mode 100644tap-windows.h
ACK. The Windows TAP driver will be moved to a separate git repository, so this again makes a lot of sense.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LS0IACgkQDC186MBRfrqvOgCgrk42BkzoFKemGFCW/tXZtdti IwkAn2FiVqsYdK59F1C4hqxq39AfR58T
=ODEe
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 07/35] build: tests do not work disable
In reply to David SommersethCheckout the latest HEAD.
The tests were modified and it is now working.
Quoted 47 lines · David Sommerseth
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 12 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> --- Makefile.am |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
Makefile.am index 26b80f3..f96eb45 100644 renamed from Makefile.am +0
-1--- a/Makefile.am +++ b/Makefile.am @@ -57,16 +57,17 @@ SUBDIRS = \service-win32 \ install-win32
-TESTS =
t_client.sht_lpback.sht_cltsrv.sh+test_scripts =t_client.sht_lpback.sht_cltsrv.sh+#TESTS = $(test_scripts)sbin_PROGRAMS= openvpnQuoted 6 lines
dist_doc_DATA= \management/management-notes.txt
dist_noinst_SCRIPTS= \ - $(TESTS) \ doclean \ domake-win \ + $(test_scripts) \t_cltsrv-down.sh\ configure_h.awk configure_log.awkWhich of these tests are not working? And how do they fail?
I'm running 'make check' before pushing a new git tree, and it passes fine for me. The only "exception" is
t_client.sh(generated via t_client.sh.in) which depends on a configuration file (t_client.rc) - otherwise it is just skipped. This test is however run in our buildbot farm, AFAIR. Gert also runs this test in his development repos. So it's rather odd to hear that these tests fail.kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/iEYEARECAAYFAk9LRl4ACgkQDC186MBRfrrWcQCgklcEZ8ATjLQqsQ9mxOFLbMjM 2FAAoI2cJAVd7GVdv9hO7TvkSSVCAPmK
=xG/s
-----END PGP SIGNATURE-----