6efeaa: Added support for new PolarSSL 1.1 RNG
Branch: refs/heads/master
Home: https://github.com/OpenVPN/openvpn
Commit: 6efeaa2e4462bc10f395d8aceed363c3e77b35a3
https://github.com/OpenVPN/openvpn/commit/6efeaa2e4462bc10f395d8aceed363c3e77b35a3
Author: Adriaan de Jong <[email protected]...>
Date: 2012-04-27 (Fri, 27 Apr 2012)
Changed paths:
M src/openvpn/crypto_polarssl.c
M src/openvpn/crypto_polarssl.h
M src/openvpn/ssl.c
M src/openvpn/ssl_backend.h
M src/openvpn/ssl_polarssl.c
M src/openvpn/ssl_polarssl.h
Log Message:
-----------
Added support for new PolarSSL 1.1 RNG
This patch, while retaining PolarSSL 1.0 support, introduces the PolarSSL 1.1 DRBG. This RNG adds a number of features, including support for personalisation strings and multiple entropy sources.
Personalisation strings have been implemented, based on PID, program name, place within memory, and a hash of the user's certificate.
The entropy sources used are the platform default ones. Which ones these are depends on how PolarSSL was built, but usually this includes:
- /dev/urandom or the Windows CryptoAPI RNG
- the HAVEGE RNG
- the output of PolarSSL's hardclock() call (usually RDTSC)
Finally, this patch moves to only one instance of the RNG per OpenVPN instance, instead of one per keystate
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/6210
src/openvpn/crypto_polarssl.c +74 -10
@@ -42,12 +42,18 @@#include "buffer.h" #include "integer.h" #include "crypto_backend.h" +#include "otime.h" +#include "misc.h" #include <polarssl/des.h> #include <polarssl/md5.h> #include <polarssl/cipher.h> #include <polarssl/havege.h> +#if (POLARSSL_VERSION_NUMBER >=0x01010000 ) +#include <polarssl/entropy.h> +#endif +/* * * Hardware engine support. Allows loading/unloading of engines.
@@ -149,7 +155,6 @@ "available\n"); } -/* * * Random number functions, used in cases where we want
@@ -159,29 +164,88 @@* */ -int -rand_bytes (uint8_t *output,int len) +/* +* Initialise the given ctr_drbg context, using a personalisation string and an +* entropy gathering function. +*/ +#if (POLARSSL_VERSION_NUMBER >=0x01010000 ) +ctr_drbg_context *rand_ctx_get () +{ +static entropy_context ec = {0 }; +static ctr_drbg_context cd_ctx = {0 }; +static bool rand_initialised = false; + +if (!rand_initialised) + { +struct gc_arena gc =gc_new (); +struct buffer pers_string =alloc_buf_gc (100 , &gc); + +/* +* Personalisation string, should be as unique as possible (see NIST +* 800-90 section 8.7.1). We have very little information at this stage. +* Include Program Name, memory address of the context and PID. +*/ +buf_printf (&pers_string,"OpenVPN %0u %p %s" ,platform_getpid (), &cd_ctx,time_string (0 ,0 ,0 , &gc)); + +/* Initialise PolarSSL RNG, and built-in entropy sources */ +entropy_init (&ec); + +if (0 !=ctr_drbg_init (&cd_ctx, entropy_func, &ec,BPTR (&pers_string),BLEN (&pers_string))) +msg (M_FATAL ,"Failed to initialize random generator" ); + +gc_free (&gc); + rand_initialised = true; + } + +return &cd_ctx; +} + +#else /* (POLARSSL_VERSION_NUMBER < 0x01010000) */ + +havege_state *rand_ctx_get () {static havege_state hs = {0 }; -static bool hs_initialised = false; -const int int_size =sizeof (int ); +static bool rand_initialised = false; -if (!hs_initialised) +if (!rand_initialised) {/* Initialise PolarSSL RNG */ havege_init (&hs); - hs_initialised = true; + rand_initialised = true; } +return &hs; +} + +#endif /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ + +int +rand_bytes (uint8_t *output,int len) +{ +#if (POLARSSL_VERSION_NUMBER >=0x01010000 ) +ctr_drbg_context *rng_ctx =rand_ctx_get (); +#else /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ +havege_state *rng_ctx =rand_ctx_get (); +#endif /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ +while (len >0 ) { -const int blen =min_int (len, int_size); -const int rand_int =havege_rand (&hs); - +#if (POLARSSL_VERSION_NUMBER >=0x01010000 ) +const size_t blen =min_int (len,CTR_DRBG_MAX_REQUEST ); +if (0 !=ctr_drbg_random (rng_ctx, output, blen)) +return 0 ; + +#else /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ +const size_t blen =min_int (len,sizeof (int )); +const int rand_int =havege_rand (rng_ctx);memcpy (output, &rand_int, blen); + +#endif /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ + output += blen; len -= blen; } +return 1 ; }
src/openvpn/crypto_polarssl.h +25 -0
@@ -30,9 +30,16 @@#ifndef CRYPTO_POLARSSL_H_ #define CRYPTO_POLARSSL_H_ +#include <polarssl/version.h> #include <polarssl/cipher.h> #include <polarssl/md.h> +#if (POLARSSL_VERSION_NUMBER >=0x01010000 ) +# include <polarssl/ctr_drbg.h> +#else +# include <polarssl/havege.h> +#endif +/** Generic cipher key type %context. */ typedef cipher_info_t cipher_kt_t ;
@@ -71,4 +78,22 @@#define SHA_DIGEST_LENGTH 20#define DES_KEY_LENGTH 8 +/** +* Returns a singleton instance of the PolarSSL random number generator. +* +* For PolarSSL 1.0, this is the HAVEGE random number generator. +* +* For PolarSSL 1.1+, this is the CTR_DRBG random number generator. If it +* hasn't been initialised yet, the RNG will be initialised using the default +* entropy sources. Aside from the default platform entropy sources, an +* additional entropy source, the HAVEGE random number generator will also be +* added. During initialisation, a personalisation string will be added based +* on the time, the PID, and a pointer to the random context. +*/ +#if (POLARSSL_VERSION_NUMBER >=0x01010000 ) +ctr_drbg_context *rand_ctx_get (); +#else +havege_state *rand_ctx_get (); +#endif +#endif /* CRYPTO_POLARSSL_H_ */
src/openvpn/ssl.c +5 -0
@@ -391,6 +391,11 @@tls_ctx_restrict_ciphers (new_ctx, options->cipher_list); } +#ifdef ENABLE_CRYPTO_POLARSSL +/* Fox-IT hardening: Personalise the random by mixing in the certificate */ +tls_ctx_personalise_random (new_ctx); +#endif +tls_clear_error ();return ;
src/openvpn/ssl_backend.h +10 -0
@@ -272,6 +272,16 @@ void tls_ctx_load_extra_certs (struct tls_root_ctx *ctx, const char *extra_certs#endif ); +#ifdef ENABLE_CRYPTO_POLARSSL +/** +* Add a personalisation string to the PolarSSL RNG, based on the certificate +* loaded into the given context. +* +* @param ctx TLS context to use +*/ +void tls_ctx_personalise_random (struct tls_root_ctx *ctx); +#endif +/* ************************************** * * Key-state specific functions
src/openvpn/ssl_polarssl.c +34 -10
82 lines not on this page · raw message
src/openvpn/ssl_polarssl.h +0 -2
@@ -30,7 +30,6 @@#ifndef SSL_POLARSSL_H_ #define SSL_POLARSSL_H_ -#include <polarssl/havege.h> #include <polarssl/ssl.h> #include "config.h"
@@ -63,7 +62,6 @@ struct tls_root_ctx {int endpoint;/**< Whether or not this is a server or a client */ -havege_state *hs;/**< HAVEGE random number state */ dhm_context *dhm_ctx;/**< Diffie-Helmann-Merkle context */ x509_cert *crt_chain;/**< Local Certificate chain */ x509_cert *ca_chain;/**< CA chain for remote verification */
================================================================
Commit: 0f25d2969f09ba4263dc37944e1f10405a2df461
https://github.com/OpenVPN/openvpn/commit/0f25d2969f09ba4263dc37944e1f10405a2df461
Author: Adriaan de Jong <[email protected]...>
Date: 2012-04-27 (Fri, 27 Apr 2012)
Changed paths:
M doc/openvpn.8
M src/openvpn/crypto_polarssl.c
M src/openvpn/crypto_polarssl.h
M src/openvpn/init.c
M src/openvpn/options.c
M src/openvpn/options.h
M src/openvpn/syshead.h
Log Message:
-----------
Added a configuration option to enable prediction resistance in the PolarSSL random number generator.
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/6213
doc/openvpn.8 +14 -0
@@ -3846,6 +3846,20 @@ space-saving optimization that uses the unique identifier for datagram replay protection as the IV. .\"********************************************************* .TP +.B \-\-use-prediction-resistance +Enable prediction resistance on PolarSSL's RNG. + +Enabling prediction resistance causes the RNG to reseed in each +call for random. Reseeding this often can quickly deplete the kernel +entropy pool. + +If you need this option, please consider running a daemon that adds +entropy to the kernel pool. + +Note that this option only works with PolarSSL versions greater +than 1.1. +.\"********************************************************* +.TP .B \-\-test-crypto Do a self-test of OpenVPN's crypto options by encrypting and decrypting test packets using the data channel encryption options
src/openvpn/crypto_polarssl.c +9 -0
@@ -219,6 +219,15 @@ havege_state * rand_ctx_get()#endif /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ +#ifdef ENABLE_PREDICTION_RESISTANCE +void rand_ctx_enable_prediction_resistance () +{ +ctr_drbg_context *cd_ctx =rand_ctx_get (); + +ctr_drbg_set_prediction_resistance (cd_ctx,1 ); +} +#endif /* ENABLE_PREDICTION_RESISTANCE */ +int rand_bytes (uint8_t *output,int len) {
src/openvpn/crypto_polarssl.h +7 -0
@@ -96,4 +96,11 @@havege_state *rand_ctx_get ();#endif +#ifdef ENABLE_PREDICTION_RESISTANCE +/** +* Enable prediction resistance on the random number generator. +*/ +void rand_ctx_enable_prediction_resistance (); +#endif +#endif /* CRYPTO_POLARSSL_H_ */
src/openvpn/init.c +6 -0
@@ -2008,6 +2008,12 @@if (c->options.mute_replay_warnings) c->c2.crypto_options.flags |=CO_MUTE_REPLAY_WARNINGS ; + +#ifdef ENABLE_PREDICTION_RESISTANCE +if (c->options.use_prediction_resistance) +rand_ctx_enable_prediction_resistance (); +#endif + }/*
src/openvpn/options.c +22 -0
@@ -545,6 +545,10 @@ " using file.\n" "--test-crypto : Run a self-test of crypto features enabled.\n" " For debugging only.\n" +#ifdef ENABLE_PREDICTION_RESISTANCE + "--use-prediction-resistance: Enable prediction resistance on the random\n" + " number generator.\n" +#endif#ifdef ENABLE_SSL "\n" "TLS Key Negotiation Options:\n"
@@ -837,6 +841,9 @@ o->replay_time =DEFAULT_TIME_BACKTRACK ; o->use_iv = true; o->key_direction =KEY_DIRECTION_BIDIRECTIONAL ; +#ifdef ENABLE_PREDICTION_RESISTANCE + o->use_prediction_resistance = false; +#endif #ifdef ENABLE_SSL o->key_method =2 ; o->tls_timeout =2 ;
@@ -1581,6 +1588,9 @@ static bool ipv6_addr_safe_hexplusbits( const char * ipv6_prefix_spec )SHOW_STR (packet_id_file);SHOW_BOOL (use_iv);SHOW_BOOL (test_crypto); +#ifdef ENABLE_PREDICTION_RESISTANCE +SHOW_BOOL (use_prediction_resistance); +#endif #ifdef ENABLE_SSL SHOW_BOOL (tls_server);
@@ -3018,6 +3028,11 @@ struct http_proxy_options *buf_printf (&out,",no-replay" );if (!o->use_iv)buf_printf (&out,",no-iv" ); + +#ifdef ENABLE_PREDICTION_RESISTANCE +if (o->use_prediction_resistance) +buf_printf (&out,",use-prediction-resistance" ); +#endif }#ifdef ENABLE_SSL
@@ -6416,6 +6431,13 @@ void options_string_import (struct options *options, options->keysize = keysize; }#endif +#ifdef ENABLE_PREDICTION_RESISTANCE + else if (streq (p[0], "use-prediction-resistance")) + { +VERIFY_PERMISSION (OPT_P_GENERAL ); + options->use_prediction_resistance = true; + } +#endif #ifdef ENABLE_SSL else if (streq (p[0], "show-tls")) {
src/openvpn/options.h +3 -0
@@ -520,6 +520,9 @@ struct optionsconst char *packet_id_file;bool use_iv;bool test_crypto; +#ifdef ENABLE_PREDICTION_RESISTANCE +bool use_prediction_resistance; +#endif #ifdef ENABLE_SSL /* TLS (control channel) parms */
src/openvpn/syshead.h +8 -0
@@ -538,6 +538,14 @@#define MANAGMENT_EXTERNAL_KEY #endif +/* Enable PolarSSL RNG prediction resistance support */ +#ifdef ENABLE_CRYPTO_POLARSSL +#include <polarssl/version.h> +#if POLARSSL_VERSION_NUMBER >=0x01010000 +#define ENABLE_PREDICTION_RESISTANCE +#endif +#endif /* ENABLE_CRYPTO_POLARSSL */ +/* * MANAGEMENT_IN_EXTRA allows the management interface to * read multi-line inputs from clients.
================================================================
Commit: 21fdfb73d5d18038872da15cd15026f40666b4d5
https://github.com/OpenVPN/openvpn/commit/21fdfb73d5d18038872da15cd15026f40666b4d5
Author: Adriaan de Jong <[email protected]...>
Date: 2012-04-27 (Fri, 27 Apr 2012)
Changed paths:
M configure.ac
Log Message:
-----------
Use POLARSSL_CFLAGS instead of POLARSSL_CRYPTO_CFLAGS in configure.ac
Ensured that the used variable name actually matches the one advertised by configure.
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/6208
configure.ac +1 -1
@@ -828,7 +828,7 @@ case "${with_crypto_library}" in polarssl) have_crypto_crypto="${have_polarssl_crypto}" have_crypto_ssl="${have_polarssl_ssl}" - CRYPTO_CRYPTO_CFLAGS="${POLARSSL_CRYPTO_CFLAGS}" + CRYPTO_CRYPTO_CFLAGS="${POLARSSL_CFLAGS}" CRYPTO_CRYPTO_LIBS="${POLARSSL_LIBS}" AC_DEFINE([ENABLE_CRYPTO_POLARSSL], [1], [Use PolarSSL library]) ;;
================================================================
Commit: 1d92d06dca5ac38990261cb546a766b91fc53f9b
https://github.com/OpenVPN/openvpn/commit/1d92d06dca5ac38990261cb546a766b91fc53f9b
Author: Adriaan de Jong <[email protected]...>
Date: 2012-04-27 (Fri, 27 Apr 2012)
Changed paths:
M src/openvpn/crypto_polarssl.c
M src/openvpn/crypto_polarssl.h
M src/openvpn/ssl_polarssl.c
M src/openvpn/syshead.h
Log Message:
-----------
Removed support for PolarSSL < 1.1
PolarSSL 1.0 and earlier use only the Havege RNG. Havege is based on timing certain operations, using the RDTSC instruction. Although this is fine on bare metal PCs, the RDTSC instruction is virtualised on some virtual machine implementations. This can result in issues on those virtual machines. PolarSSL fixes this potential issue by also using platform entropy.
To ensure that OpenVPN is always built against a decent RNG, PolarSSL <1.1 is therefore no longer supported.
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/6211
src/openvpn/crypto_polarssl.c +0 -34
@@ -50,9 +50,7 @@#include <polarssl/cipher.h> #include <polarssl/havege.h> -#if (POLARSSL_VERSION_NUMBER >=0x01010000 )#include <polarssl/entropy.h> -#endif /* *
@@ -168,7 +166,6 @@* Initialise the given ctr_drbg context, using a personalisation string and an * entropy gathering function. */ -#if (POLARSSL_VERSION_NUMBER >=0x01010000 )ctr_drbg_context *rand_ctx_get () {static entropy_context ec = {0 };
@@ -200,25 +197,6 @@ ctr_drbg_context * rand_ctx_get()return &cd_ctx; } -#else /* (POLARSSL_VERSION_NUMBER < 0x01010000) */ - -havege_state *rand_ctx_get () -{ -static havege_state hs = {0 }; -static bool rand_initialised = false; - -if (!rand_initialised) - { -/* Initialise PolarSSL RNG */ -havege_init (&hs); - rand_initialised = true; - } - -return &hs; -} - -#endif /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ -#ifdef ENABLE_PREDICTION_RESISTANCE void rand_ctx_enable_prediction_resistance () {
@@ -231,26 +209,14 @@ void rand_ctx_enable_prediction_resistance()int rand_bytes (uint8_t *output,int len) { -#if (POLARSSL_VERSION_NUMBER >=0x01010000 )ctr_drbg_context *rng_ctx =rand_ctx_get (); -#else /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ -havege_state *rng_ctx =rand_ctx_get (); -#endif /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ while (len >0 ) { -#if (POLARSSL_VERSION_NUMBER >=0x01010000 )const size_t blen =min_int (len,CTR_DRBG_MAX_REQUEST );if (0 !=ctr_drbg_random (rng_ctx, output, blen))return 0 ; -#else /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ -const size_t blen =min_int (len,sizeof (int )); -const int rand_int =havege_rand (rng_ctx); -memcpy (output, &rand_int, blen); - -#endif /* (POLARSSL_VERSION_NUMBER >= 0x01010000) */ - output += blen; len -= blen; }
src/openvpn/crypto_polarssl.h +1 -12
@@ -33,12 +33,7 @@#include <polarssl/version.h> #include <polarssl/cipher.h> #include <polarssl/md.h> - -#if (POLARSSL_VERSION_NUMBER >=0x01010000 ) -# include <polarssl/ctr_drbg.h> -#else -# include <polarssl/havege.h> -#endif +#include <polarssl/ctr_drbg.h> /** Generic cipher key type %context. */ typedef cipher_info_t cipher_kt_t ;
@@ -81,8 +76,6 @@/** * Returns a singleton instance of the PolarSSL random number generator. * -* For PolarSSL 1.0, this is the HAVEGE random number generator. -* * For PolarSSL 1.1+, this is the CTR_DRBG random number generator. If it * hasn't been initialised yet, the RNG will be initialised using the default * entropy sources. Aside from the default platform entropy sources, an
@@ -90,11 +83,7 @@* added. During initialisation, a personalisation string will be added based * on the time, the PID, and a pointer to the random context. */ -#if (POLARSSL_VERSION_NUMBER >=0x01010000 )ctr_drbg_context *rand_ctx_get (); -#else -havege_state *rand_ctx_get (); -#endif #ifdef ENABLE_PREDICTION_RESISTANCE /**
src/openvpn/ssl_polarssl.c +0 -6
@@ -503,7 +503,6 @@ static void my_debug( void *ctx, int level, const char *str )*/ void tls_ctx_personalise_random (struct tls_root_ctx *ctx) { -#if (POLARSSL_VERSION_NUMBER >=0x01010000 )static char old_sha256_hash[32 ] = {0 };char sha256_hash[32 ] = {0 };ctr_drbg_context *cd_ctx =rand_ctx_get ();
@@ -519,7 +518,6 @@ void tls_ctx_personalise_random(struct tls_root_ctx *ctx)memcpy (old_sha256_hash, sha256_hash,sizeof (old_sha256_hash)); } } -#endif /* POLARSSL_VERSION_NUMBER >= 0x01010000 */ } void key_state_ssl_init(struct key_state_ssl *ks_ssl,
@@ -536,11 +534,7 @@ void key_state_ssl_init(struct key_state_ssl *ks_ssl,ssl_set_dbg (ks_ssl->ctx, my_debug,NULL );ssl_set_endpoint (ks_ssl->ctx, ssl_ctx->endpoint); -#if (POLARSSL_VERSION_NUMBER >=0x01010000 )ssl_set_rng (ks_ssl->ctx, ctr_drbg_random,rand_ctx_get ()); -#else /* POLARSSL_VERSION_NUMBER >= 0x01010000 */ -ssl_set_rng (ks_ssl->ctx, havege_rand,rand_ctx_get ()); -#endif /* POLARSSL_VERSION_NUMBER >= 0x01010000 */ ALLOC_OBJ_CLEAR (ks_ssl->ssn, ssl_session);ssl_set_session (ks_ssl->ctx,0 ,0 , ks_ssl->ssn );
src/openvpn/syshead.h +0 -3
@@ -540,10 +540,7 @@/* Enable PolarSSL RNG prediction resistance support */ #ifdef ENABLE_CRYPTO_POLARSSL -#include <polarssl/version.h> -#if POLARSSL_VERSION_NUMBER >=0x01010000 #define ENABLE_PREDICTION_RESISTANCE -#endif #endif /* ENABLE_CRYPTO_POLARSSL */ /*
================================================================
Commit: 34091048af1ba94e8bf2049354610d16f8bb3d4c
https://github.com/OpenVPN/openvpn/commit/34091048af1ba94e8bf2049354610d16f8bb3d4c
Author: Adriaan de Jong <[email protected]...>
Date: 2012-04-27 (Fri, 27 Apr 2012)
Changed paths:
M README.polarssl
Log Message:
-----------
Updated README.polarssl with build system changes.
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/6209
README.polarssl +2 -2
@@ -3,11 +3,11 @@ instructions: To Build and Install, - ./configure --with-ssl-type=polarssl + ./configure --with-crypto-library=polarssl make make install -This version depends on at least PolarSSL v0.99. +This version depends on at least PolarSSL v1.1. *************************************************************************
================================================================
Commit: 4029971240b6274b9b30e76ff74c7f689d7d9750
https://github.com/OpenVPN/openvpn/commit/4029971240b6274b9b30e76ff74c7f689d7d9750
Author: Alon Bar-Lev <[email protected]...>
Date: 2012-04-27 (Fri, 27 Apr 2012)
Changed paths:
M configure.ac
M src/compat/Makefile.am
A src/compat/compat-stdbool.h
M src/openvpn/basic.h
M src/openvpn/syshead.h
Log Message:
-----------
build: use stdbool.h if available
If stdbool.h is available use it, otherwise create emulation.
basic.h defines a type 'bool' that conflicts with the altivec keyword bool which has to be fixed upstream, see bugs[1][2].
[1] https://bugs.gentoo.org/show_bug.cgi?id=293840
[2] https://bugs.gentoo.org/show_bug.cgi?id=297854
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/6363
configure.ac +1 -1
@@ -354,7 +354,7 @@ AX_EMPTY_ARRAY AC_CHECK_SIZEOF([unsigned int]) AC_CHECK_SIZEOF([unsigned long]) AC_CHECK_HEADERS([ \ - stdio.h stdarg.h limits.h \ + stdio.h stdarg.h stdbool.h limits.h \ time.h errno.h fcntl.h io.h direct.h \ ctype.h sys/types.h sys/socket.h \ signal.h unistd.h dlfcn.h \
src/compat/Makefile.am +1 -0
@@ -20,6 +20,7 @@ noinst_LTLIBRARIES = libcompat.la libcompat_la_SOURCES = \ compat.h \ + compat-stdbool.h \ compat-dirname.c \ compat-basename.c \ compat-gettimeofday.c \
src/compat/compat-stdbool.h new file +12 -0
@@ -0,0 +1,12 @@ +#ifndef __COMPAT_STDBOOL_H +#define __COMPAT_STDBOOL_H + +#ifdef HAVE_STDBOOL_H +#include <stdbool.h> +#else +typedef int bool ; +#define false 0 +#define true 1 +#endif + +#endif
src/openvpn/basic.h +0 -13
@@ -25,19 +25,6 @@#ifndef BASIC_H #define BASIC_H -/* bool definitions */ -#ifndef bool -#define bool int -#endif - -#ifndef true -#define true 1 -#endif - -#ifndef false -#define false 0 -#endif -#define BOOL_CAST (x) ((x) ? (true) : (false))/* size of an array */
src/openvpn/syshead.h +1 -0
@@ -26,6 +26,7 @@#define SYSHEAD_H #include "compat.h" +#include "compat-stdbool.h" /* branch prediction hints */ #if defined(__GNUC__)
================================================================
Commit: 8993847de727cf503bec58b41fbf0f71b9c617e7
https://github.com/OpenVPN/openvpn/commit/8993847de727cf503bec58b41fbf0f71b9c617e7
Author: Alon Bar-Lev <[email protected]...>
Date: 2012-04-27 (Fri, 27 Apr 2012)
Changed paths:
M configure.ac
Log Message: ----------- build: fix typo in --enable-save-password
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/6371
configure.ac +1 -0
@@ -168,6 +168,7 @@ AC_ARG_ENABLE( AC_ARG_ENABLE( [password-save], [AS_HELP_STRING([--enable-password-save], [allow --askpass and --auth-user-pass passwords to be read from a file @<:@default=yes@:>@])], + , [enable_password_save="no"] )
================================================================
Commit: 4b87c868333e6aca5cb78bc345059e61c72b9423
https://github.com/OpenVPN/openvpn/commit/4b87c868333e6aca5cb78bc345059e61c72b9423
Author: Adriaan de Jong <[email protected]...>
Date: 2012-04-27 (Fri, 27 Apr 2012)
Changed paths:
M src/openvpn/ssl.c
Log Message:
-----------
Removed stray "Fox-IT hardening" string.
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/6212
src/openvpn/ssl.c +1 -1
@@ -392,7 +392,7 @@ }#ifdef ENABLE_CRYPTO_POLARSSL -/* Fox-IT hardening: Personalise the random by mixing in the certificate */ +/* Personalise the random by mixing in the certificate */ tls_ctx_personalise_random (new_ctx);#endif
================================================================
Compare: https://github.com/OpenVPN/openvpn/compare/4e846b3...4b87c86