Re: [PATCH v4 0/4] MR6835: wintrust: Implement support for CryptCATAdminAcquireContext2 and CryptCATAdminCalcHashFromFileHandle2
21 Nov
2024
21 Nov
'24
9:33 a.m.
Hans Leidekker (@hans) commented about dlls/wintrust/crypt.c:
+ ALG_ID alg = CALG_SHA1; + const WCHAR *providerName = MS_DEF_PROV_W; + DWORD providerType = PROV_RSA_FULL; + DWORD hashLength = 20;
if (!hFile || !pcbHash || dwFlags) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - if (*pcbHash < 20) - { - *pcbHash = 20; + + if (ca && ca->magic == CATADMIN_MAGIC) { + alg = ca->alg; Magic is already checked in CryptCATAdminCalcHashFromFileHandle2() so this check is redundant.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6835#note_88254
392
Age (days ago)
392
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hans Leidekker (@hans)