Author: akhaldi Date: Tue Nov 17 21:12:00 2015 New Revision: 69929
URL: http://svn.reactos.org/svn/reactos?rev=69929&view=rev Log: [CRYPT32] Sync with Wine Staging 1.7.55. CORE-10536
Modified: trunk/reactos/dll/win32/crypt32/CMakeLists.txt trunk/reactos/dll/win32/crypt32/cert.c trunk/reactos/dll/win32/crypt32/crypt32.spec trunk/reactos/dll/win32/crypt32/decode.c trunk/reactos/dll/win32/crypt32/main.c trunk/reactos/dll/win32/crypt32/regstore.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/crypt32/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/CMakeList... ============================================================================== --- trunk/reactos/dll/win32/crypt32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/CMakeLists.txt [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -1,3 +1,6 @@ + +remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502) +add_definitions(-D_WIN32_WINNT=0x600 -DWINVER=0x600)
add_definitions( -D__WINESRC__ @@ -42,7 +45,7 @@
set_module_type(crypt32 win32dll) target_link_libraries(crypt32 wine ${PSEH_LIB} oldnames) -add_importlibs(crypt32 user32 advapi32 shlwapi msvcrt kernel32 ntdll) +add_importlibs(crypt32 user32 advapi32 advapi32_vista msvcrt kernel32 ntdll) add_delay_importlibs(crypt32 cryptnet) add_pch(crypt32 crypt32_private.h SOURCE) add_cd_file(TARGET crypt32 DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/dll/win32/crypt32/cert.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/cert.c?re... ============================================================================== --- trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -685,6 +685,7 @@ case CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID: case CERT_ENROLLMENT_PROP_ID: case CERT_CROSS_CERT_DIST_POINTS_PROP_ID: + case CERT_OCSP_RESPONSE_PROP_ID: case CERT_RENEWAL_PROP_ID: { if (pvData)
Modified: trunk/reactos/dll/win32/crypt32/crypt32.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32.s... ============================================================================== --- trunk/reactos/dll/win32/crypt32/crypt32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/crypt32.spec [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -163,6 +163,7 @@ @ stub CryptMsgVerifyCountersignatureEncoded @ stdcall CryptMsgVerifyCountersignatureEncodedEx(ptr long ptr long ptr long long ptr long ptr) @ stdcall CryptProtectData(ptr wstr ptr ptr ptr long ptr) +@ stdcall CryptProtectMemory(ptr long long) @ stdcall CryptQueryObject(long ptr long long long ptr ptr ptr ptr ptr ptr) @ stdcall CryptRegisterDefaultOIDFunction(long str long wstr) @ stdcall CryptRegisterOIDFunction(long str str wstr str) @@ -186,6 +187,7 @@ @ stdcall CryptSignMessage(ptr long long ptr ptr ptr ptr) @ stub CryptSignMessageWithKey @ stdcall CryptUnprotectData(ptr ptr ptr ptr ptr long ptr) +@ stdcall CryptUnprotectMemory(ptr long long) @ stdcall CryptUnregisterDefaultOIDFunction(long str wstr) @ stdcall CryptUnregisterOIDFunction(long str str) @ stub CryptUnregisterOIDInfo
Modified: trunk/reactos/dll/win32/crypt32/decode.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/decode.c?... ============================================================================== --- trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -3985,18 +3985,19 @@ &size, NULL, NULL); if (ret) { - halflen = decodedKey->modulus.cbData / 2; - if ((decodedKey->modulus.cbData != halflen * 2) || - (decodedKey->prime1.cbData != halflen) || - (decodedKey->prime2.cbData != halflen) || - (decodedKey->exponent1.cbData != halflen) || - (decodedKey->exponent2.cbData != halflen) || - (decodedKey->coefficient.cbData != halflen) || - (decodedKey->privexp.cbData != halflen * 2)) - { - ret = FALSE; - SetLastError(CRYPT_E_BAD_ENCODE); - } + halflen = decodedKey->prime1.cbData; + if (halflen < decodedKey->prime2.cbData) + halflen = decodedKey->prime2.cbData; + if (halflen < decodedKey->exponent1.cbData) + halflen = decodedKey->exponent1.cbData; + if (halflen < decodedKey->exponent2.cbData) + halflen = decodedKey->exponent2.cbData; + if (halflen < decodedKey->coefficient.cbData) + halflen = decodedKey->coefficient.cbData; + if (halflen * 2 < decodedKey->modulus.cbData) + halflen = decodedKey->modulus.cbData / 2 + decodedKey->modulus.cbData % 2; + if (halflen * 2 < decodedKey->privexp.cbData) + halflen = decodedKey->privexp.cbData / 2 + decodedKey->privexp.cbData % 2;
if (ret) { @@ -4031,20 +4032,21 @@ rsaPubKey->bitlen = halflen * 16;
vardata = (BYTE*)(rsaPubKey + 1); + memset(vardata, 0, halflen * 9); memcpy(vardata, - decodedKey->modulus.pbData, halflen * 2); + decodedKey->modulus.pbData, decodedKey->modulus.cbData); memcpy(vardata + halflen * 2, - decodedKey->prime1.pbData, halflen); + decodedKey->prime1.pbData, decodedKey->prime1.cbData); memcpy(vardata + halflen * 3, - decodedKey->prime2.pbData, halflen); + decodedKey->prime2.pbData, decodedKey->prime2.cbData); memcpy(vardata + halflen * 4, - decodedKey->exponent1.pbData, halflen); + decodedKey->exponent1.pbData, decodedKey->exponent1.cbData); memcpy(vardata + halflen * 5, - decodedKey->exponent2.pbData, halflen); + decodedKey->exponent2.pbData, decodedKey->exponent2.cbData); memcpy(vardata + halflen * 6, - decodedKey->coefficient.pbData, halflen); + decodedKey->coefficient.pbData, decodedKey->coefficient.cbData); memcpy(vardata + halflen * 7, - decodedKey->privexp.pbData, halflen * 2); + decodedKey->privexp.pbData, decodedKey->privexp.cbData); } }
Modified: trunk/reactos/dll/win32/crypt32/main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/main.c?re... ============================================================================== --- trunk/reactos/dll/win32/crypt32/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/main.c [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -241,3 +241,16 @@ FIXME("(%08x): stub\n", x); return NULL; } + +BOOL WINAPI CryptProtectMemory(void *data, DWORD len, DWORD flags) +{ + FIXME("(%p %u %08x): stub\n", data, len, flags); + return TRUE; +} + +BOOL WINAPI CryptUnprotectMemory(void *data, DWORD len, DWORD flags) +{ + static int fixme_once; + if (!fixme_once++) FIXME("(%p %u %08x): stub\n", data, len, flags); + return TRUE; +}
Modified: trunk/reactos/dll/win32/crypt32/regstore.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/regstore.... ============================================================================== --- trunk/reactos/dll/win32/crypt32/regstore.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/regstore.c [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -509,12 +509,12 @@
if (dwFlags & CERT_STORE_DELETE_FLAG) { - DWORD rc = SHDeleteKeyW((HKEY)pvPara, CertsW); + DWORD rc = RegDeleteTreeW((HKEY)pvPara, CertsW);
if (rc == ERROR_SUCCESS || rc == ERROR_NO_MORE_ITEMS) - rc = SHDeleteKeyW((HKEY)pvPara, CRLsW); + rc = RegDeleteTreeW((HKEY)pvPara, CRLsW); if (rc == ERROR_SUCCESS || rc == ERROR_NO_MORE_ITEMS) - rc = SHDeleteKeyW((HKEY)pvPara, CTLsW); + rc = RegDeleteTreeW((HKEY)pvPara, CTLsW); if (rc == ERROR_NO_MORE_ITEMS) rc = ERROR_SUCCESS; SetLastError(rc);
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=6... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Nov 17 21:12:00 2015 @@ -58,7 +58,7 @@ reactos/dll/win32/comdlg32 # Synced to WineStaging-1.7.47 reactos/dll/win32/compstui # Synced to WineStaging-1.7.47 reactos/dll/win32/credui # Synced to WineStaging-1.7.47 -reactos/dll/win32/crypt32 # Synced to WineStaging-1.7.47 +reactos/dll/win32/crypt32 # Synced to WineStaging-1.7.55 reactos/dll/win32/cryptdlg # Synced to WineStaging-1.7.47 reactos/dll/win32/cryptdll # Synced to WineStaging-1.7.47 reactos/dll/win32/cryptnet # Synced to WineStaging-1.7.47