Cipher problem on Mac OS X
Sorry, patch format got broken in previous email. Hope this works better.
From 8774577f48cb901ab22825aa6df8093b47de633b Mon Sep 17 00:00:00 2001
From: Frank de Brabander <[email protected]>
Date: Thu, 16 Feb 2012 13:51:04 +0100
Subject: [PATCH] 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.
--- crypto_backend.h | 2 +- crypto_openssl.c | 2 +- crypto_polarssl.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
crypto_backend.h +1 -1
@@ -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);/**
crypto_openssl.c +1 -1
@@ -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);
crypto_polarssl.c +1 -1
@@ -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);
Signature · 1 line
1.7.5.4
David Sommerseth
Acked-by Adriaan de Jong-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 2 lines · Frank de Brabander
Sorry, patch format got broken in previous email. Hope this works better.
No worries, patches is tricky in quite some MUAs.
Anyhow, patch is applied to master on -testing and -stable trees.
commit 6449a149f850e9e1207233f3ca642d9342fbfbaf
Author: Frank de Brabander <[email protected]...> Date: Thu Feb 16 13:51:04 2012 +0100
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.
Kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk89EC4ACgkQDC186MBRfrpLNgCcDo+3ZRWi5T62iUZVEjaVOsBH +cIAoKQbItKZqgR+f372PCqCy8Fuo3ia
=pey+
-----END PGP SIGNATURE-----