]> Savannah Git Hosting - gnulib.git/commitdiff
crypto/gc: Cope with libgcrypt without SM3.
authorSimon Josefsson <simon@josefsson.org>
Wed, 24 Jul 2019 08:01:50 +0000 (10:01 +0200)
committerSimon Josefsson <simon@josefsson.org>
Wed, 24 Jul 2019 08:03:56 +0000 (10:03 +0200)
* lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage.

ChangeLog
lib/gc-libgcrypt.c

index 9b994381bc85671ddf4f1ad86ef73e406f1350b6..539e7a09fa9826963eb460e5b11a51af70444053 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-24  Simon Josefsson  <simon@josefsson.org>
+
+       crypto/gc: Cope with libgcrypt without SM3.
+       * lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage.
+
 2019-07-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        backupfile: fix resource leak on memory failure
index ac348434d16a12f9c985c988ddb3fccf45f706ed..468356689183b8c23f4d540b19e1fb9b1f3a2420 100644 (file)
@@ -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;