Reactos

[WINTRUST] Sync with Wine Staging 4.18. CORE-16441

+137 -139
+32 -44
dll/win32/wintrust/asn.c
··· 18 18 * 19 19 */ 20 20 21 - #include "config.h" 22 - #include "wine/port.h" 23 - 24 21 #include <stdarg.h> 25 22 #include <stdio.h> 26 23 #include <assert.h> ··· 673 670 items[1].pvStructInfo = &algo->Parameters; 674 671 else 675 672 items[1].pvStructInfo = &nullBlob; 676 - ret = CRYPT_AsnEncodeSequence(dwCertEncodingType, items, 677 - sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); 673 + ret = CRYPT_AsnEncodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 674 + pbEncoded, pcbEncoded); 678 675 return ret; 679 676 } 680 677 ··· 688 685 { &typeValue->Value, CRYPT_CopyEncodedBlob, 0 }, 689 686 }; 690 687 691 - return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, 692 - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); 688 + return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), 689 + pbEncoded, pcbEncoded); 693 690 } 694 691 695 692 struct SPCDigest ··· 708 705 { &digest->Digest, CRYPT_CopyEncodedBlob, 0 }, 709 706 }; 710 707 711 - return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, 712 - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); 708 + return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), 709 + pbEncoded, pcbEncoded); 713 710 } 714 711 715 712 BOOL WINAPI WVTAsn1SpcIndirectDataContentEncode(DWORD dwCertEncodingType, ··· 729 726 { &data->DigestAlgorithm, CRYPT_AsnEncodeSPCDigest, 0 }, 730 727 }; 731 728 732 - ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, 733 - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); 729 + ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), 730 + pbEncoded, pcbEncoded); 734 731 } 735 732 __EXCEPT_PAGE_FAULT 736 733 { ··· 996 993 { &info->dwCertVersion, CRYPT_AsnEncodeInt, 0 }, 997 994 }; 998 995 999 - ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, 1000 - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); 996 + ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), 997 + pbEncoded, pcbEncoded); 1001 998 } 1002 999 __EXCEPT_PAGE_FAULT 1003 1000 { ··· 1025 1022 { &value->Value, CRYPT_AsnEncodeOctets, 0 }, 1026 1023 }; 1027 1024 1028 - ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, 1029 - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); 1025 + ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), 1026 + pbEncoded, pcbEncoded); 1030 1027 } 1031 1028 __EXCEPT_PAGE_FAULT 1032 1029 { ··· 1084 1081 { &criteria->fMeetsCriteria, CRYPT_AsnEncodeBool, 0 }, 1085 1082 }; 1086 1083 1087 - ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, 1088 - items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); 1084 + ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, items, ARRAY_SIZE(items), 1085 + pbEncoded, pcbEncoded); 1089 1086 } 1090 1087 __EXCEPT_PAGE_FAULT 1091 1088 { ··· 1808 1805 offsetof(SPC_PE_IMAGE_DATA, pFile), 0 }, 1809 1806 }; 1810 1807 1811 - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, 1812 - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, 1813 - pvStructInfo, pcbStructInfo, NULL); 1808 + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 1809 + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); 1814 1810 } 1815 1811 __EXCEPT_PAGE_FAULT 1816 1812 { ··· 1995 1991 TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, 1996 1992 pvStructInfo, *pcbStructInfo); 1997 1993 1998 - return CRYPT_AsnDecodeSequence(dwCertEncodingType, items, 1999 - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, 2000 - pvStructInfo, pcbStructInfo, 1994 + return CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 1995 + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, 2001 1996 typeValue ? typeValue->pszObjId : NULL); 2002 1997 } 2003 1998 ··· 2019 2014 TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, 2020 2015 pvStructInfo, *pcbStructInfo); 2021 2016 2022 - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, 2023 - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, 2024 - pvStructInfo, pcbStructInfo, algo ? algo->pszObjId : NULL); 2017 + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 2018 + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, algo ? algo->pszObjId : NULL); 2025 2019 if (ret && pvStructInfo) 2026 2020 { 2027 2021 TRACE("pszObjId is %p (%s)\n", algo->pszObjId, ··· 2048 2042 TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, 2049 2043 pvStructInfo, *pcbStructInfo); 2050 2044 2051 - return CRYPT_AsnDecodeSequence(dwCertEncodingType, items, 2052 - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, 2053 - pvStructInfo, pcbStructInfo, 2045 + return CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 2046 + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, 2054 2047 digest ? digest->DigestAlgorithm.pszObjId : NULL); 2055 2048 } 2056 2049 ··· 2076 2069 offsetof(SPC_INDIRECT_DATA_CONTENT, DigestAlgorithm.pszObjId), 0 }, 2077 2070 }; 2078 2071 2079 - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, 2080 - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, 2081 - pvStructInfo, pcbStructInfo, NULL); 2072 + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 2073 + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); 2082 2074 } 2083 2075 __EXCEPT_PAGE_FAULT 2084 2076 { ··· 2174 2166 offsetof(SPC_SP_OPUS_INFO, pPublisherInfo), 0 }, 2175 2167 }; 2176 2168 2177 - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, 2178 - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, 2179 - pvStructInfo, pcbStructInfo, NULL); 2169 + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 2170 + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); 2180 2171 } 2181 2172 __EXCEPT_PAGE_FAULT 2182 2173 { ··· 2256 2247 FALSE, FALSE, 0, 0 }, 2257 2248 }; 2258 2249 2259 - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, 2260 - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, 2261 - pvStructInfo, pcbStructInfo, NULL); 2250 + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 2251 + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); 2262 2252 } 2263 2253 __EXCEPT_PAGE_FAULT 2264 2254 { ··· 2292 2282 offsetof(CAT_NAMEVALUE, Value.pbData), 0 }, 2293 2283 }; 2294 2284 2295 - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, 2296 - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, 2297 - pvStructInfo, pcbStructInfo, NULL); 2285 + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 2286 + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); 2298 2287 } 2299 2288 __EXCEPT_PAGE_FAULT 2300 2289 { ··· 2367 2356 fMeetsCriteria), FALSE, FALSE, 0, 0 }, 2368 2357 }; 2369 2358 2370 - ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, 2371 - sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded, dwFlags, 2372 - pvStructInfo, pcbStructInfo, NULL); 2359 + ret = CRYPT_AsnDecodeSequence(dwCertEncodingType, items, ARRAY_SIZE(items), 2360 + pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, NULL); 2373 2361 } 2374 2362 __EXCEPT_PAGE_FAULT 2375 2363 {
+36 -26
dll/win32/wintrust/crypt.c
··· 33 33 #include "winternl.h" 34 34 35 35 #include "wine/debug.h" 36 - #include "wine/unicode.h" 37 36 38 37 WINE_DEFAULT_DEBUG_CHANNEL(wintrust); 39 38 ··· 75 74 SetLastError(ERROR_OUTOFMEMORY); 76 75 return INVALID_HANDLE_VALUE; 77 76 } 78 - strcpyW(ci->file, filename); 77 + lstrcpyW(ci->file, filename); 79 78 ci->magic = CATINFO_MAGIC; 80 79 return ci; 81 80 } ··· 125 124 } 126 125 127 126 GetSystemDirectoryW(catroot_dir, MAX_PATH); 128 - strcatW(catroot_dir, catroot); 127 + lstrcatW(catroot_dir, catroot); 129 128 130 129 /* create the directory if it doesn't exist */ 131 130 CreateDirectoryW(catroot_dir, NULL); 132 131 133 132 if (!sys) sys = &defsys; 134 - sprintfW(ca->path, fmt, catroot_dir, sys->Data1, sys->Data2, 133 + swprintf(ca->path, fmt, catroot_dir, sys->Data1, sys->Data2, 135 134 sys->Data3, sys->Data4[0], sys->Data4[1], sys->Data4[2], 136 135 sys->Data4[3], sys->Data4[4], sys->Data4[5], sys->Data4[6], 137 136 sys->Data4[7]); ··· 147 146 } 148 147 149 148 /*********************************************************************** 149 + * CryptCATAdminAcquireContext2 (WINTRUST.@) 150 + */ 151 + BOOL WINAPI CryptCATAdminAcquireContext2(HCATADMIN *catAdmin, const GUID *sys, const WCHAR *algorithm, 152 + const CERT_STRONG_SIGN_PARA *policy, DWORD flags) 153 + { 154 + FIXME("%p %s %s %p %x stub\n", catAdmin, debugstr_guid(sys), debugstr_w(algorithm), policy, flags); 155 + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 156 + return FALSE; 157 + } 158 + 159 + /*********************************************************************** 150 160 * CryptCATAdminAddCatalog (WINTRUST.@) 151 161 */ 152 162 HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile, ··· 173 183 return NULL; 174 184 } 175 185 176 - len = strlenW(ca->path) + strlenW(selectBaseName) + 2; 186 + len = lstrlenW(ca->path) + lstrlenW(selectBaseName) + 2; 177 187 if (!(target = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) 178 188 { 179 189 SetLastError(ERROR_OUTOFMEMORY); 180 190 return NULL; 181 191 } 182 - strcpyW(target, ca->path); 183 - strcatW(target, slashW); 184 - strcatW(target, selectBaseName); 192 + lstrcpyW(target, ca->path); 193 + lstrcatW(target, slashW); 194 + lstrcatW(target, selectBaseName); 185 195 186 196 if (!CopyFileW(catalogFile, target, FALSE)) 187 197 { ··· 197 207 return NULL; 198 208 } 199 209 ci->magic = CATINFO_MAGIC; 200 - strcpyW(ci->file, target); 210 + lstrcpyW(ci->file, target); 201 211 202 212 HeapFree(GetProcessHeap(), 0, target); 203 213 return ci; ··· 297 307 { 298 308 WCHAR *path; 299 309 300 - size = strlenW(ca->path) * sizeof(WCHAR) + sizeof(globW); 310 + size = lstrlenW(ca->path) * sizeof(WCHAR) + sizeof(globW); 301 311 if (!(path = HeapAlloc(GetProcessHeap(), 0, size))) 302 312 { 303 313 CryptReleaseContext(prov, 0); 304 314 SetLastError(ERROR_OUTOFMEMORY); 305 315 return NULL; 306 316 } 307 - strcpyW(path, ca->path); 308 - strcatW(path, globW); 317 + lstrcpyW(path, ca->path); 318 + lstrcatW(path, globW); 309 319 310 320 FindClose(ca->find); 311 321 ca->find = FindFirstFileW(path, &data); ··· 331 341 struct catinfo *ci; 332 342 HANDLE hcat; 333 343 334 - size = (strlenW(ca->path) + strlenW(data.cFileName) + 2) * sizeof(WCHAR); 344 + size = (lstrlenW(ca->path) + lstrlenW(data.cFileName) + 2) * sizeof(WCHAR); 335 345 if (!(filename = HeapAlloc(GetProcessHeap(), 0, size))) 336 346 { 337 347 SetLastError(ERROR_OUTOFMEMORY); 338 348 return NULL; 339 349 } 340 - strcpyW(filename, ca->path); 341 - strcatW(filename, slashW); 342 - strcatW(filename, data.cFileName); 350 + lstrcpyW(filename, ca->path); 351 + lstrcatW(filename, slashW); 352 + lstrcatW(filename, data.cFileName); 343 353 344 354 hcat = CryptCATOpen(filename, CRYPTCAT_OPEN_EXISTING, prov, 0, 0); 345 355 if (hcat == INVALID_HANDLE_VALUE) ··· 476 486 477 487 /* Only delete when there is a filename and no path */ 478 488 if (pwszCatalogFile && pwszCatalogFile[0] != 0 && 479 - !strchrW(pwszCatalogFile, '\\') && !strchrW(pwszCatalogFile, '/') && 480 - !strchrW(pwszCatalogFile, ':')) 489 + !wcschr(pwszCatalogFile, '\\') && !wcschr(pwszCatalogFile, '/') && 490 + !wcschr(pwszCatalogFile, ':')) 481 491 { 482 492 static const WCHAR slashW[] = {'\\',0}; 483 493 WCHAR *target; 484 494 DWORD len; 485 495 486 - len = strlenW(ca->path) + strlenW(pwszCatalogFile) + 2; 496 + len = lstrlenW(ca->path) + lstrlenW(pwszCatalogFile) + 2; 487 497 if (!(target = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) 488 498 { 489 499 SetLastError(ERROR_OUTOFMEMORY); 490 500 return FALSE; 491 501 } 492 - strcpyW(target, ca->path); 493 - strcatW(target, slashW); 494 - strcatW(target, pwszCatalogFile); 502 + lstrcpyW(target, ca->path); 503 + lstrcatW(target, slashW); 504 + lstrcatW(target, pwszCatalogFile); 495 505 496 506 DeleteFileW(target); 497 507 ··· 517 527 SetLastError(ERROR_INVALID_PARAMETER); 518 528 return FALSE; 519 529 } 520 - strcpyW(info->wszCatalogFile, ca->path); 521 - strcatW(info->wszCatalogFile, slashW); 522 - strcatW(info->wszCatalogFile, catalog_file); 530 + lstrcpyW(info->wszCatalogFile, ca->path); 531 + lstrcatW(info->wszCatalogFile, slashW); 532 + lstrcatW(info->wszCatalogFile, catalog_file); 523 533 524 534 return TRUE; 525 535 } ··· 834 844 SetLastError(ERROR_INVALID_PARAMETER); 835 845 return FALSE; 836 846 } 837 - strcpyW(info->wszCatalogFile, ci->file); 847 + lstrcpyW(info->wszCatalogFile, ci->file); 838 848 return TRUE; 839 849 } 840 850
+1 -3
dll/win32/wintrust/precomp.h
··· 2 2 #ifndef _WINTRUST_PRECOMP_H 3 3 #define _WINTRUST_PRECOMP_H 4 4 5 - #include <wine/config.h> 6 - 7 5 #include <stdio.h> 8 6 9 7 #define _INC_WINDOWS ··· 15 13 #include <winbase.h> 16 14 #include <winuser.h> 17 15 #include <winreg.h> 16 + #include <winnls.h> 18 17 #include <winternl.h> 19 18 #include <softpub.h> 20 19 #include <mscat.h> 21 20 22 21 #include <wine/debug.h> 23 - #include <wine/unicode.h> 24 22 25 23 #include "wintrust_priv.h" 26 24
+26 -49
dll/win32/wintrust/softpub.c
··· 210 210 return err; 211 211 } 212 212 213 + static BOOL hash_file_data( HANDLE file, DWORD start, DWORD end, HCRYPTHASH hash ) 214 + { 215 + DWORD bytes_read, size = end - start; 216 + DWORD buffer_size = min( size, 1024*1024 ); 217 + BYTE *buffer = HeapAlloc( GetProcessHeap(), 0, buffer_size ); 218 + 219 + if (!buffer) return FALSE; 220 + SetFilePointer( file, start, NULL, FILE_BEGIN ); 221 + while (size) 222 + { 223 + if (!ReadFile( file, buffer, min( buffer_size, size ), &bytes_read, NULL )) break; 224 + if (!bytes_read) break; 225 + if (!CryptHashData( hash, buffer, bytes_read, 0 )) break; 226 + size -= bytes_read; 227 + } 228 + HeapFree( GetProcessHeap(), 0, buffer ); 229 + return !size; 230 + } 231 + 213 232 /* See https://www.cs.auckland.ac.nz/~pgut001/pubs/authenticode.txt 214 233 * for details about the hashing. 215 234 */ 216 235 static BOOL SOFTPUB_HashPEFile(HANDLE file, HCRYPTHASH hash) 217 236 { 218 - DWORD pos, checksum, security_dir; 237 + DWORD checksum, security_dir; 219 238 IMAGE_DOS_HEADER dos_header; 220 239 union 221 240 { ··· 225 244 IMAGE_DATA_DIRECTORY secdir; 226 245 LARGE_INTEGER file_size; 227 246 DWORD bytes_read; 228 - BYTE buffer[1024]; 229 247 BOOL ret; 230 248 231 249 if (!GetFileSizeEx(file, &file_size)) ··· 237 255 return FALSE; 238 256 239 257 if (dos_header.e_magic != IMAGE_DOS_SIGNATURE) 240 - { 241 - ERR("Unrecognized IMAGE_DOS_HEADER magic %04x\n", dos_header.e_magic); 242 258 return FALSE; 243 - } 244 259 if (dos_header.e_lfanew >= 256 * 1024 * 1024) /* see RtlImageNtHeaderEx */ 245 260 return FALSE; 246 261 if (dos_header.e_lfanew + FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader.MajorLinkerVersion) > file_size.QuadPart) ··· 253 268 return FALSE; 254 269 255 270 if (nt_header.nt32.Signature != IMAGE_NT_SIGNATURE) 256 - { 257 - ERR("Unrecognized IMAGE_NT_HEADERS signature %08x\n", nt_header.nt32.Signature); 258 271 return FALSE; 259 - } 260 272 261 273 if (nt_header.nt32.OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) 262 274 { ··· 277 289 secdir = nt_header.nt64.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY]; 278 290 } 279 291 else 280 - { 281 - ERR("Unrecognized OptionalHeader magic %04x\n", nt_header.nt32.OptionalHeader.Magic); 282 292 return FALSE; 283 - } 284 293 285 294 if (secdir.VirtualAddress < security_dir + sizeof(IMAGE_DATA_DIRECTORY)) 286 295 return FALSE; ··· 289 298 if (secdir.VirtualAddress + secdir.Size != file_size.QuadPart) 290 299 return FALSE; 291 300 292 - /* Hash until checksum. */ 293 - SetFilePointer(file, 0, NULL, FILE_BEGIN); 294 - for (pos = 0; pos < checksum; pos += bytes_read) 295 - { 296 - ret = ReadFile(file, buffer, min(sizeof(buffer), checksum - pos), &bytes_read, NULL); 297 - if (!ret || !bytes_read) 298 - return FALSE; 299 - if (!CryptHashData(hash, buffer, bytes_read, 0)) 300 - return FALSE; 301 - } 302 - 303 - /* Hash until the DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY] entry. */ 304 - checksum += sizeof(DWORD); 305 - SetFilePointer(file, checksum, NULL, FILE_BEGIN); 306 - for (pos = checksum; pos < security_dir; pos += bytes_read) 307 - { 308 - ret = ReadFile(file, buffer, min(sizeof(buffer), security_dir - pos), &bytes_read, NULL); 309 - if (!ret || !bytes_read) 310 - return FALSE; 311 - if (!CryptHashData(hash, buffer, bytes_read, 0)) 312 - return FALSE; 313 - } 314 - 315 - /* Hash until the end of the file. */ 316 - security_dir += sizeof(IMAGE_DATA_DIRECTORY); 317 - SetFilePointer(file, security_dir, NULL, FILE_BEGIN); 318 - for (pos = security_dir; pos < secdir.VirtualAddress; pos += bytes_read) 319 - { 320 - ret = ReadFile(file, buffer, min(sizeof(buffer), secdir.VirtualAddress - pos), &bytes_read, NULL); 321 - if (!ret || !bytes_read) 322 - return FALSE; 323 - if (!CryptHashData(hash, buffer, bytes_read, 0)) 324 - return FALSE; 325 - } 301 + if (!hash_file_data( file, 0, checksum, hash )) return FALSE; 302 + if (!hash_file_data( file, checksum + sizeof(DWORD), security_dir, hash )) return FALSE; 303 + if (!hash_file_data( file, security_dir + sizeof(IMAGE_DATA_DIRECTORY), secdir.VirtualAddress, hash )) 304 + return FALSE; 326 305 327 306 return TRUE; 328 307 } ··· 716 695 717 696 if (!time) return NULL; 718 697 719 - GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SSHORTDATE, dateFmt, 720 - sizeof(dateFmt) / sizeof(dateFmt[0])); 698 + GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SSHORTDATE, dateFmt, ARRAY_SIZE(dateFmt)); 721 699 FileTimeToSystemTime(time, &sysTime); 722 - GetDateFormatA(LOCALE_SYSTEM_DEFAULT, 0, &sysTime, dateFmt, date, 723 - sizeof(date) / sizeof(date[0])); 700 + GetDateFormatA(LOCALE_SYSTEM_DEFAULT, 0, &sysTime, dateFmt, date, ARRAY_SIZE(date)); 724 701 return date; 725 702 } 726 703
+31
dll/win32/wintrust/wintrust.spec
··· 1 1 @ stub AddPersonalTrustDBPages 2 2 @ stub CatalogCompactHashDatabase 3 + #@ stub ComputeFirstPageHash 4 + #@ stub ConfigCiFinalPolicy 5 + #@ stub ConfigCiPackageFamilyNameCheck 3 6 @ stdcall CryptCATAdminAcquireContext(ptr ptr long) 7 + @ stdcall CryptCATAdminAcquireContext2(ptr ptr wstr ptr long) 4 8 @ stdcall CryptCATAdminAddCatalog(long wstr wstr long) 5 9 @ stdcall CryptCATAdminCalcHashFromFileHandle(long ptr ptr long) 10 + #@ stub CryptCATAdminCalcHashFromFileHandle2 6 11 @ stdcall CryptCATAdminEnumCatalogFromHash(long ptr long long ptr) 7 12 @ stub CryptCATAdminPauseServiceForBackup 8 13 @ stdcall CryptCATAdminReleaseCatalogContext(long long long) 9 14 @ stdcall CryptCATAdminReleaseContext(long long) 10 15 @ stdcall CryptCATAdminRemoveCatalog(ptr wstr long) 11 16 @ stdcall CryptCATAdminResolveCatalogPath(ptr wstr ptr long) 17 + #@ stub CryptCATAllocSortedMemberInfo 12 18 @ stdcall CryptCATCDFClose(ptr) 13 19 @ stub CryptCATCDFEnumAttributes 14 20 @ stub CryptCATCDFEnumAttributesWithCDFTag ··· 22 28 @ stdcall CryptCATEnumerateAttr(ptr ptr ptr) 23 29 @ stdcall CryptCATEnumerateCatAttr(ptr ptr) 24 30 @ stdcall CryptCATEnumerateMember(long ptr) 31 + #@ stub CryptCATFreeSortedMemberInfo 25 32 @ stdcall CryptCATGetAttrInfo(ptr ptr wstr) 26 33 @ stdcall CryptCATGetCatAttrInfo(ptr wstr ) 27 34 @ stdcall CryptCATGetMemberInfo(ptr wstr) ··· 34 41 @ stub CryptCATStoreFromHandle 35 42 @ stub CryptCATVerifyMember 36 43 @ stdcall CryptSIPCreateIndirectData(ptr ptr ptr) 44 + #@ stub CryptSIPGetCaps 37 45 @ stub CryptSIPGetInfo 38 46 @ stub CryptSIPGetRegWorkingFlags 47 + #@ stub CryptSIPGetSealedDigest 39 48 @ stdcall CryptSIPGetSignedDataMsg(ptr ptr long ptr ptr) 40 49 @ stdcall CryptSIPPutSignedDataMsg(ptr long ptr long ptr) 41 50 @ stdcall CryptSIPRemoveSignedDataMsg(ptr long) ··· 48 57 @ stdcall FindCertsByIssuer(ptr ptr ptr ptr long wstr long) 49 58 @ stdcall GenericChainCertificateTrust(ptr) 50 59 @ stdcall GenericChainFinalProv(ptr) 60 + #@ stub GetAuthenticodeSha256Hash 51 61 @ stdcall HTTPSCertificateTrust(ptr) 52 62 @ stdcall HTTPSFinalProv(ptr) 53 63 @ stdcall IsCatalogFile(ptr wstr) ··· 56 66 @ stub OfficeCleanupPolicy 57 67 @ stub OfficeInitializePolicy 58 68 @ stdcall OpenPersonalTrustDBDialog(ptr) 69 + #@ stub OpenPersonalTrustDBDialogEx 59 70 @ stdcall SoftpubAuthenticode(ptr) 60 71 @ stdcall SoftpubCheckCert(ptr long long long) 61 72 @ stdcall SoftpubCleanup(ptr) ··· 68 79 @ stub SoftpubLoadDefUsageCallData 69 80 @ stdcall SoftpubLoadMessage(ptr) 70 81 @ stdcall SoftpubLoadSignature(ptr) 82 + #@ stub SrpCheckSmartlockerEAandProcessToken 71 83 @ stub TrustDecode 72 84 @ stub TrustFindIssuerCertificate 73 85 @ stub TrustFreeDecode 74 86 @ stdcall TrustIsCertificateSelfSigned(ptr) 75 87 @ stub TrustOpenStores 88 + #@ stub WTGetBioSignatureInfo 89 + #@ stub WTGetPluginSignatureInfo 90 + #@ stub WTGetSignatureInfo 76 91 @ stdcall WTHelperCertCheckValidSignature(ptr) 77 92 @ stub WTHelperCertFindIssuerCertificate 78 93 @ stub WTHelperCertIsSelfSigned 79 94 @ stub WTHelperCheckCertUsage 80 95 @ stub WTHelperGetAgencyInfo 81 96 @ stdcall WTHelperGetFileHandle(ptr) 97 + #@ stub WTHelperGetFileHash 82 98 @ stdcall WTHelperGetFileName(ptr) 83 99 @ stdcall WTHelperGetKnownUsages(long ptr) 84 100 @ stdcall WTHelperGetProvCertFromChain(ptr long) 85 101 @ stdcall WTHelperGetProvPrivateDataFromChain(ptr ptr) 86 102 @ stdcall WTHelperGetProvSignerFromChain(ptr long long long) 103 + #@ stub WTHelperIsChainedToMicrosoft 104 + #@ stub WTHelperIsChainedToMicrosoftFromStateData 87 105 @ stub WTHelperIsInRootStore 88 106 @ stub WTHelperOpenKnownStores 89 107 @ stdcall WTHelperProvDataFromStateData(ptr) 108 + #@ stub WTIsFirstConfigCiResultPreferred 109 + #@ stub WTLogConfigCiScriptEvent 110 + #@ stub WTLogConfigCiSignerEvent 111 + #@ stub WTValidateBioSignaturePolicy 112 + #@ stub WVTAsn1CatMemberInfo2Decode 113 + #@ stub WVTAsn1CatMemberInfo2Encode 90 114 @ stdcall WVTAsn1CatMemberInfoDecode(long str ptr long long ptr ptr) 91 115 @ stdcall WVTAsn1CatMemberInfoEncode(long str ptr ptr ptr) 92 116 @ stdcall WVTAsn1CatNameValueDecode(long str ptr long long ptr ptr) 93 117 @ stdcall WVTAsn1CatNameValueEncode(long str ptr ptr ptr) 118 + #@ stub WVTAsn1IntentToSealAttributeDecode 119 + #@ stub WVTAsn1IntentToSealAttributeEncode 120 + #@ stub WVTAsn1SealingSignatureAttributeDecode 121 + #@ stub WVTAsn1SealingSignatureAttributeEncode 122 + #@ stub WVTAsn1SealingTimestampAttributeDecode 123 + #@ stub WVTAsn1SealingTimestampAttributeEncode 94 124 @ stdcall WVTAsn1SpcFinancialCriteriaInfoDecode(long str ptr long long ptr ptr) 95 125 @ stdcall WVTAsn1SpcFinancialCriteriaInfoEncode(long str ptr ptr ptr) 96 126 @ stdcall WVTAsn1SpcIndirectDataContentDecode(long str ptr long long ptr ptr) ··· 118 148 @ stdcall WintrustGetRegPolicyFlags(ptr) 119 149 @ stdcall WintrustLoadFunctionPointers(ptr ptr) 120 150 @ stdcall WintrustRemoveActionID(ptr) 151 + #@ stub WintrustSetDefaultIncludePEPageHashes 121 152 @ stdcall WintrustSetRegPolicyFlags(long) 122 153 @ stdcall mscat32DllRegisterServer() 123 154 @ stdcall mscat32DllUnregisterServer()
+10 -16
dll/win32/wintrust/wintrust_main.c
··· 17 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 18 18 */ 19 19 20 - #include "config.h" 21 - 22 20 #include <stdarg.h> 23 21 24 22 #define NONAMELESSUNION ··· 309 307 goto done; 310 308 311 309 error: 312 - if (provData) 313 - { 314 - WINTRUST_Free(provData->padwTrustStepErrors); 315 - WINTRUST_Free(provData->u.pPDSip); 316 - WINTRUST_Free(provData->psPfns); 317 - WINTRUST_Free(provData); 318 - } 310 + WINTRUST_Free(provData->padwTrustStepErrors); 311 + WINTRUST_Free(provData->u.pPDSip); 312 + WINTRUST_Free(provData->psPfns); 313 + WINTRUST_Free(provData); 314 + 319 315 done: 320 316 TRACE("returning %08x\n", err); 321 317 return err; ··· 502 498 goto done; 503 499 504 500 error: 505 - if (provData) 506 - { 507 - WINTRUST_Free(provData->padwTrustStepErrors); 508 - WINTRUST_Free(provData->u.pPDSip); 509 - WINTRUST_Free(provData->psPfns); 510 - WINTRUST_Free(provData); 511 - } 501 + WINTRUST_Free(provData->padwTrustStepErrors); 502 + WINTRUST_Free(provData->u.pPDSip); 503 + WINTRUST_Free(provData->psPfns); 504 + WINTRUST_Free(provData); 505 + 512 506 done: 513 507 TRACE("returning %08x\n", err); 514 508 return err;
+1 -1
media/doc/README.WINE
··· 207 207 dll/win32/winmm/midimap # Forked at Wine-20050628 208 208 dll/win32/winmm/wavemap # Forked at Wine-20050628 209 209 dll/win32/winscard # Synced to WineStaging-4.18 210 - dll/win32/wintrust # Synced to WineStaging-3.9 210 + dll/win32/wintrust # Synced to WineStaging-4.18 211 211 dll/win32/wldap32 # Synced to WineStaging-3.3 212 212 dll/win32/wmi # Synced to WineStaging-2.9 213 213 dll/win32/wmiutils # Synced to WineStaging-3.3