From 0e2a57f8c802d1825096e3024d8bbdc8c0a171c8 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Mon, 6 Jul 2009 13:25:29 +0000 Subject: [PATCH] * eet: Fix compilation when disabling signature, with gnutls enabled. SVN revision: 41256 --- legacy/eet/src/lib/eet_cipher.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/legacy/eet/src/lib/eet_cipher.c b/legacy/eet/src/lib/eet_cipher.c index 0532413719..6064a16217 100644 --- a/legacy/eet/src/lib/eet_cipher.c +++ b/legacy/eet/src/lib/eet_cipher.c @@ -348,22 +348,26 @@ eet_identity_compute_sha1(const void *data_base, unsigned int data_length, { void *result; -#ifdef HAVE_GNUTLS +#ifdef HAVE_SIGNATURE +# ifdef HAVE_GNUTLS result = malloc(gcry_md_get_algo_dlen(GCRY_MD_SHA1)); if (!result) return NULL; gcry_md_hash_buffer(GCRY_MD_SHA1, result, data_base, data_length); if (sha1_length) *sha1_length = gcry_md_get_algo_dlen(GCRY_MD_SHA1); -#else -# ifdef HAVE_OPENSSL +# else +# ifdef HAVE_OPENSSL result = malloc(SHA_DIGEST_LENGTH); if (!result) return NULL; SHA1(data_base, data_length, result); if (sha1_length) *sha1_length = SHA_DIGEST_LENGTH; -# else +# else + result = NULL; +# endif +# endif +#else result = NULL; -# endif #endif return result;