]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed wrong return type of cipher_kt_mode
authorFrank de Brabander <brabander@fox-it.com>
Thu, 16 Feb 2012 12:51:04 +0000 (13:51 +0100)
committerDavid Sommerseth <davids@redhat.com>
Thu, 16 Feb 2012 14:13:21 +0000 (15:13 +0100)
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 <brabander@fox-it.com>
Acked-by: Adriaan de Jong <dejong@fox-it.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
crypto_backend.h
crypto_openssl.c
crypto_polarssl.c

index 86229620f5cb80e02c1ea5ec0ede1ce65a56a58c..a0966dd044c2d701c9a2f5314a68b8e86bd24a84 100644 (file)
@@ -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);
 
 
 /**
index db6b78e50732e7eb5ac601e3c73ad7c7cabdf559..0a41b39dbf33f5a695531a1a3eea394a4a47e430 100644 (file)
@@ -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);
index e7470d50d1403b0b3d4606529ea91ea64f00f1bf..ac4caddb114181eb1b3141b4365b931b7942c685 100644 (file)
@@ -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);