GnuPG 2.0 and RIPEMD160 signatures with gpg-agent and an OpenPGP card

Michael Bienia michael at vorlon.ping.de
Thu Jan 4 21:12:11 CET 2007


On 2006-12-22 22:34:29 +0100, Michael Bienia wrote:
> GnuPG 2.0 can only generate SHA1 signatures when used with gpg-agent and
> an OpenPGP card. I've already had the same problem with GnuPG 1.4 in
> March 2006 [1]. It was fixed with svn commits 4075 and 4076.

Here is a patch for it.

Michael

--- gnupg2-2.0.1.orig/g10/call-agent.c
+++ gnupg2-2.0.1/g10/call-agent.c
@@ -668,7 +668,9 @@
     snprintf (line, DIM(line)-1, "SCD PKAUTH %s", serialno);
   else
 #endif
-   snprintf (line, DIM(line)-1, "SCD PKSIGN %s", serialno);
+   snprintf (line, DIM(line)-1, "SCD PKSIGN %s%s",
+	     hashalgo == GCRY_MD_RMD160? "--hash=rmd160 ": "",
+	     serialno);
   line[DIM(line)-1] = 0;
   rc = assuan_transact (agent_ctx, line, membuf_data_cb, &data,
                         NULL, NULL, NULL, NULL);



More information about the Gnupg-devel mailing list