2006-09-24 Marcus Brinkmann <marcus@g10code.de>

* app-openpgp.c (do_sign): Advance INDATA by the SHA1 resp. RMD160
        prefix length.
This commit is contained in:
Marcus Brinkmann 2006-09-23 23:32:44 +00:00
parent 2db8df0ba3
commit 2301fc2926
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-09-24 Marcus Brinkmann <marcus@g10code.de>
* app-openpgp.c (do_sign): Advance INDATA by the SHA1 resp. RMD160
prefix length.
2006-09-14 Werner Koch <wk@g10code.com>
Replaced all call gpg_error_from_errno(errno) by

View File

@ -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"),