forked from enlightenment/efl
* eet: Fix compilation when disabling signature, with gnutls enabled.
SVN revision: 41256
This commit is contained in:
parent
dbaeb5eaba
commit
0e2a57f8c8
|
@ -348,22 +348,26 @@ eet_identity_compute_sha1(const void *data_base, unsigned int data_length,
|
||||||
{
|
{
|
||||||
void *result;
|
void *result;
|
||||||
|
|
||||||
#ifdef HAVE_GNUTLS
|
#ifdef HAVE_SIGNATURE
|
||||||
|
# ifdef HAVE_GNUTLS
|
||||||
result = malloc(gcry_md_get_algo_dlen(GCRY_MD_SHA1));
|
result = malloc(gcry_md_get_algo_dlen(GCRY_MD_SHA1));
|
||||||
if (!result) return NULL;
|
if (!result) return NULL;
|
||||||
|
|
||||||
gcry_md_hash_buffer(GCRY_MD_SHA1, result, data_base, data_length);
|
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);
|
if (sha1_length) *sha1_length = gcry_md_get_algo_dlen(GCRY_MD_SHA1);
|
||||||
#else
|
# else
|
||||||
# ifdef HAVE_OPENSSL
|
# ifdef HAVE_OPENSSL
|
||||||
result = malloc(SHA_DIGEST_LENGTH);
|
result = malloc(SHA_DIGEST_LENGTH);
|
||||||
if (!result) return NULL;
|
if (!result) return NULL;
|
||||||
|
|
||||||
SHA1(data_base, data_length, result);
|
SHA1(data_base, data_length, result);
|
||||||
if (sha1_length) *sha1_length = SHA_DIGEST_LENGTH;
|
if (sha1_length) *sha1_length = SHA_DIGEST_LENGTH;
|
||||||
# else
|
# else
|
||||||
|
result = NULL;
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
result = NULL;
|
result = NULL;
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue