From: Simon Josefsson Date: Wed, 24 Jul 2019 08:01:50 +0000 (+0200) Subject: crypto/gc: Cope with libgcrypt without SM3. X-Git-Tag: v1.0~4727 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f9221bccca3b7d403c2c0840f7afdfc6d76a3ca5;p=gnulib.git crypto/gc: Cope with libgcrypt without SM3. * lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage. --- diff --git a/ChangeLog b/ChangeLog index 9b994381bc..539e7a09fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-07-24 Simon Josefsson + + crypto/gc: Cope with libgcrypt without SM3. + * lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage. + 2019-07-23 Paul Eggert backupfile: fix resource leak on memory failure diff --git a/lib/gc-libgcrypt.c b/lib/gc-libgcrypt.c index ac348434d1..4683566891 100644 --- a/lib/gc-libgcrypt.c +++ b/lib/gc-libgcrypt.c @@ -304,9 +304,11 @@ gc_hash_open (Gc_hash hash, Gc_hash_mode mode, gc_hash_handle * outhandle) gcryalg = GCRY_MD_RMD160; break; +#ifdef GNULIB_GC_SM3 case GC_SM3: gcryalg = GCRY_MD_SM3; break; +#endif default: rc = GC_INVALID_HASH;