From: Frank de Brabander Date: Thu, 16 Feb 2012 12:51:04 +0000 (+0100) Subject: Fixed wrong return type of cipher_kt_mode X-Git-Tag: v2.3-alpha1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6449a149f850e9e1207233f3ca642d9342fbfbaf;p=thirdparty%2Fopenvpn.git Fixed wrong return type of cipher_kt_mode The cipher_kt_mode uses bool as return type, this should be int. On some platforms like OS X, any returned value larger than one will be converted to 1. Signed-off-by: Frank de Brabander Acked-by: Adriaan de Jong Signed-off-by: David Sommerseth --- diff --git a/crypto_backend.h b/crypto_backend.h index 86229620f..a0966dd04 100644 --- a/crypto_backend.h +++ b/crypto_backend.h @@ -218,7 +218,7 @@ int cipher_kt_block_size (const cipher_kt_t *cipher_kt); * @return Cipher mode, either \c OPENVPN_MODE_CBC, \c * OPENVPN_MODE_OFB or \c OPENVPN_MODE_CFB */ -bool cipher_kt_mode (const cipher_kt_t *cipher_kt); +int cipher_kt_mode (const cipher_kt_t *cipher_kt); /** diff --git a/crypto_openssl.c b/crypto_openssl.c index db6b78e50..0a41b39db 100644 --- a/crypto_openssl.c +++ b/crypto_openssl.c @@ -555,7 +555,7 @@ cipher_kt_block_size (const EVP_CIPHER *cipher_kt) return EVP_CIPHER_block_size (cipher_kt); } -bool +int cipher_kt_mode (const EVP_CIPHER *cipher_kt) { ASSERT(NULL != cipher_kt); diff --git a/crypto_polarssl.c b/crypto_polarssl.c index e7470d50d..ac4caddb1 100644 --- a/crypto_polarssl.c +++ b/crypto_polarssl.c @@ -313,7 +313,7 @@ cipher_kt_block_size (const cipher_info_t *cipher_kt) return cipher_kt->block_size; } -bool +int cipher_kt_mode (const cipher_info_t *cipher_kt) { ASSERT(NULL != cipher_kt);