Module: wine Branch: master Commit: 1d0551ca49fdff68364f7cac42415cea0f586b16 URL: https://gitlab.winehq.org/wine/wine/-/commit/1d0551ca49fdff68364f7cac42415ce...
Author: Hans Leidekker hans@codeweavers.com Date: Tue Dec 12 13:14:08 2023 +0100
dssenh: Finalize the hash if necessary in CPVerifySignature().
---
dlls/dssenh/main.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c index 6772d062fc5..365b365f53f 100644 --- a/dlls/dssenh/main.c +++ b/dlls/dssenh/main.c @@ -1012,5 +1012,11 @@ BOOL WINAPI CPVerifySignature( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *s return FALSE; }
+ if (!hash->finished) + { + if (BCryptFinishHash( hash->handle, hash->value, hash->len, 0 )) return FALSE; + hash->finished = TRUE; + } + return !BCryptVerifySignature( key->handle, NULL, hash->value, hash->len, (UCHAR *)sig, siglen, 0 ); }