From: Nikos Mavrogiannopoulos Date: Sun, 23 Oct 2011 21:00:21 +0000 (+0200) Subject: initialize only a fully available hash X-Git-Tag: gnutls_3_0_5~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=603f4999699df3a063f118e10ffb225927ef3d2b;p=thirdparty%2Fgnutls.git initialize only a fully available hash --- 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) {