[PATCH 2/3] Fix building with BLAKE2 disabled

Jussi Kivilinna jussi.kivilinna at iki.fi
Mon Apr 2 11:24:29 CEST 2018


* cipher/md.c (md_setkey): Enclose Blake2 part with USE_BLAKE2.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
 cipher/md.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/cipher/md.c b/cipher/md.c
index efbffe18e..f6c1954c7 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -703,6 +703,7 @@ md_setkey (gcry_md_hd_t h, const unsigned char *key, size_t keylen)
     {
       switch (r->spec->algo)
 	{
+#if USE_BLAKE2
 	/* TODO? add spec->init_with_key? */
 	case GCRY_MD_BLAKE2B_512:
 	case GCRY_MD_BLAKE2B_384:
@@ -719,6 +720,7 @@ md_setkey (gcry_md_hd_t h, const unsigned char *key, size_t keylen)
 					     ? GCRY_MD_FLAG_BUGEMU1:0,
 					   key, keylen, r->spec->algo);
 	  break;
+#endif
 	default:
 	  rc = GPG_ERR_DIGEST_ALGO;
 	  break;




More information about the Gcrypt-devel mailing list