aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r--scd/app-openpgp.c10
1 files changed, 8 insertions, 2 deletions
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"),