[svn] GnuPG - r5375 - branches/STABLE-BRANCH-1-4/g10
svn author wk
cvs at cvs.gnupg.org
Sat Jul 24 11:18:43 CEST 2010
Author: wk
Date: 2010-07-24 11:18:42 +0200 (Sat, 24 Jul 2010)
New Revision: 5375
Modified:
branches/STABLE-BRANCH-1-4/g10/ChangeLog
branches/STABLE-BRANCH-1-4/g10/cardglue.c
branches/STABLE-BRANCH-1-4/g10/cardglue.h
Log:
support more hash algorithms to support the v2 card
Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog 2010-07-23 16:16:14 UTC (rev 5374)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog 2010-07-24 09:18:42 UTC (rev 5375)
@@ -1,3 +1,9 @@
+2010-07-24 Werner Koch <wk at g10code.com>
+
+ * cardglue.c (agent_scd_pksign): Allow more hash algorithms when
+ using with scdaemon.
+ * cardglue.h (GCRY_MD_MD5): New.
+
2010-06-18 Werner Koch <wk at g10code.com>
* parse-packet.c (skip_packet, parse_gpg_control): Take care of
Modified: branches/STABLE-BRANCH-1-4/g10/cardglue.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/cardglue.c 2010-07-23 16:16:14 UTC (rev 5374)
+++ branches/STABLE-BRANCH-1-4/g10/cardglue.c 2010-07-24 09:18:42 UTC (rev 5375)
@@ -1323,7 +1323,13 @@
{
init_membuf (&data, 1024);
snprintf (line, DIM(line)-1, "SCD PKSIGN %s%s",
- hashalgo == GCRY_MD_RMD160? "--hash=rmd160 ": "",
+ hashalgo == GCRY_MD_SHA1? "--hash=sha1 ":
+ hashalgo == GCRY_MD_SHA224? "--hash=sha224 ":
+ hashalgo == GCRY_MD_SHA256? "--hash=sha256 ":
+ hashalgo == GCRY_MD_SHA384? "--hash=sha384 ":
+ hashalgo == GCRY_MD_SHA512? "--hash=sha512 ":
+ hashalgo == GCRY_MD_RMD160? "--hash=rmd160 ":
+ hashalgo == GCRY_MD_MD5? "--hash=md5 " : "",
serialno);
line[DIM(line)-1] = 0;
rc = test_transact (assuan_transact (app->assuan_ctx, line,
Modified: branches/STABLE-BRANCH-1-4/g10/cardglue.h
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/cardglue.h 2010-07-23 16:16:14 UTC (rev 5374)
+++ branches/STABLE-BRANCH-1-4/g10/cardglue.h 2010-07-24 09:18:42 UTC (rev 5375)
@@ -181,6 +181,7 @@
#define GCRY_MD_SHA384 DIGEST_ALGO_SHA384
#define GCRY_MD_SHA512 DIGEST_ALGO_SHA512
#define GCRY_MD_SHA224 DIGEST_ALGO_SHA224
+#define GCRY_MD_MD5 DIGEST_ALGO_MD5
void gcry_mpi_release (MPI a);
MPI gcry_mpi_set_opaque (MPI a, void *p, unsigned int len);
More information about the Gnupg-commits
mailing list