* [PATCH] crypto/gc: Cope with libgcrypt without SM3.
@ 2019-07-24 8:06 Simon Josefsson
0 siblings, 0 replies; only message in thread
From: Simon Josefsson @ 2019-07-24 8:06 UTC (permalink / raw)
To: bug-gnulib
[-- Attachment #1: Type: text/plain, Size: 993 bytes --]
* lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage.
---
ChangeLog | 5 +++++
lib/gc-libgcrypt.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 9b994381b..539e7a09f 100644
--- 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
diff --git a/lib/gc-libgcrypt.c b/lib/gc-libgcrypt.c
index ac348434d..468356689 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;
--
2.20.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-24 8:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 8:06 [PATCH] crypto/gc: Cope with libgcrypt without SM3 Simon Josefsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).