]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
initialize only a fully available hash
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 23 Oct 2011 21:00:21 +0000 (23:00 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 23 Oct 2011 21:00:21 +0000 (23:00 +0200)
lib/gnutls_hash_int.c

index a6f781a4dc6419d18f4167b3668982ebba4c8e8c..b316ece0f832fbbdb43cd5bc448aee37028f0f2a 100644 (file)
@@ -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)
         {