[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] crypto/gc: Cope with libgcrypt without SM3.
From: |
Simon Josefsson |
Subject: |
[PATCH] crypto/gc: Cope with libgcrypt without SM3. |
Date: |
Wed, 24 Jul 2019 10:06:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
* 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 <address@hidden>
+
+ crypto/gc: Cope with libgcrypt without SM3.
+ * lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage.
+
2019-07-23 Paul Eggert <address@hidden>
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
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] crypto/gc: Cope with libgcrypt without SM3.,
Simon Josefsson <=