aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scd/ChangeLog5
-rw-r--r--scd/app-openpgp.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/scd/ChangeLog b/scd/ChangeLog
index b6516527a..d4b71a636 100644
--- a/scd/ChangeLog
+++ b/scd/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-24 Marcus Brinkmann <[email protected]>
+
+ * app-openpgp.c (do_sign): Advance INDATA by the SHA1 resp. RMD160
+ prefix length.
+
2006-09-14 Werner Koch <[email protected]>
Replaced all call gpg_error_from_errno(errno) by
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 0db21781e..597ef437c 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -2116,10 +2116,16 @@ do_sign (app_t app, const char *keyidstr, int hashalgo,
;
else if (indatalen == (15 + 20) && hashalgo == GCRY_MD_SHA1
&& !memcmp (indata, sha1_prefix, 15))
- ;
+ {
+ indata += 15;
+ indatalen -= 15;
+ }
else if (indatalen == (15 + 20) && hashalgo == GCRY_MD_RMD160
&& !memcmp (indata, rmd160_prefix, 15))
- ;
+ {
+ indata += 15;
+ indatalen -= 15;
+ }
else
{
log_error (_("card does not support digest algorithm %s\n"),