Fix building with BLAKE2 disabled
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 10 Apr 2018 19:03:49 +0000 (22:03 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 10 Apr 2018 19:03:49 +0000 (22:03 +0300)
* cipher/md.c (md_setkey): Enclose Blake2 part with USE_BLAKE2.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/md.c

index efbffe1..f6c1954 100644 (file)
@@ -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;