1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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

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