summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-10-23 23:00:21 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-10-23 23:00:21 +0200
commit603f4999699df3a063f118e10ffb225927ef3d2b (patch)
tree0ccad7c9c273267adf6272aef2db9fa00ec795c3
parent692120e24e0ee4e1d6e05fe3bb80ec87c01cf503 (diff)
downloadgnutls-603f4999699df3a063f118e10ffb225927ef3d2b.tar.gz
initialize only a fully available hash
-rw-r--r--lib/gnutls_hash_int.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gnutls_hash_int.c b/lib/gnutls_hash_int.c
index a6f781a4dc..b316ece0f8 100644
--- a/lib/gnutls_hash_int.c
+++ b/lib/gnutls_hash_int.c
@@ -68,7 +68,7 @@ _gnutls_hash_init (digest_hd_st * dig, gnutls_digest_algorithm_t algorithm)
/* check if a digest has been registered
*/
cc = _gnutls_get_crypto_digest (algorithm);
- if (cc != NULL)
+ if (cc != NULL && cc->init)
{
if (cc->init (algorithm, &dig->handle) < 0)
{