aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2006-09-23 23:32:44 +0000
committerMarcus Brinkmann <[email protected]>2006-09-23 23:32:44 +0000
commit2301fc2926b09afe1550fc91c8d626f72a7ad258 (patch)
treeafd21226d2245d96b2282313364b5c60dc73c247 /scd/app-openpgp.c
parentAdded iconv support and doc cleanups. (diff)
downloadgnupg-2301fc2926b09afe1550fc91c8d626f72a7ad258.tar.gz
gnupg-2301fc2926b09afe1550fc91c8d626f72a7ad258.zip
2006-09-24 Marcus Brinkmann <[email protected]>
* app-openpgp.c (do_sign): Advance INDATA by the SHA1 resp. RMD160 prefix length.
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"),