mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 13:23:10 +00:00
[RSAENH]
* Sync with Wine 1.7.1. CORE-7469 svn path=/trunk/; revision=60373
This commit is contained in:
parent
b724898e20
commit
694a01dc85
4 changed files with 15 additions and 9 deletions
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
add_definitions(-D__WINESRC__)
|
add_definitions(-D__WINESRC__)
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
||||||
|
|
||||||
spec2def(rsaenh.dll rsaenh.spec ADD_IMPORTLIB)
|
spec2def(rsaenh.dll rsaenh.spec ADD_IMPORTLIB)
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
|
@ -16,12 +15,11 @@ list(APPEND SOURCE
|
||||||
rsa.c
|
rsa.c
|
||||||
rsaenh.c
|
rsaenh.c
|
||||||
sha2.c
|
sha2.c
|
||||||
rsrc.rc
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/rsaenh.def)
|
${CMAKE_CURRENT_BINARY_DIR}/rsaenh.def)
|
||||||
|
|
||||||
add_library(rsaenh SHARED ${SOURCE})
|
add_library(rsaenh SHARED ${SOURCE} rsrc.rc)
|
||||||
set_module_type(rsaenh win32dll)
|
set_module_type(rsaenh win32dll)
|
||||||
target_link_libraries(rsaenh uuid wine)
|
target_link_libraries(rsaenh wine)
|
||||||
add_importlibs(rsaenh msvcrt crypt32 advapi32 kernel32 ntdll)
|
add_importlibs(rsaenh msvcrt crypt32 advapi32 kernel32 ntdll)
|
||||||
add_pch(rsaenh tomcrypt.h)
|
add_pch(rsaenh tomcrypt.h)
|
||||||
add_cd_file(TARGET rsaenh DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET rsaenh DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -3519,8 +3519,8 @@ mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
a->dp[0] |= *b++;
|
a->dp[0] |= *b++;
|
||||||
a->used += 1;
|
a->used += 1;
|
||||||
}
|
}
|
||||||
mp_clamp (a);
|
mp_clamp (a);
|
||||||
return MP_OKAY;
|
return MP_OKAY;
|
||||||
|
|
|
@ -362,7 +362,7 @@ static struct handle_table handle_table;
|
||||||
*
|
*
|
||||||
* Initializes and destroys the handle table for the CSP's handles.
|
* Initializes and destroys the handle table for the CSP's handles.
|
||||||
*/
|
*/
|
||||||
int WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
|
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID reserved)
|
||||||
{
|
{
|
||||||
switch (fdwReason)
|
switch (fdwReason)
|
||||||
{
|
{
|
||||||
|
@ -373,10 +373,11 @@ int WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
|
if (reserved) break;
|
||||||
destroy_handle_table(&handle_table);
|
destroy_handle_table(&handle_table);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 1;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -1701,6 +1702,11 @@ static BOOL unpad_data(CONST BYTE *abData, DWORD dwDataLen, BYTE *abBuffer, DWOR
|
||||||
{
|
{
|
||||||
DWORD i;
|
DWORD i;
|
||||||
|
|
||||||
|
if (dwDataLen < 3)
|
||||||
|
{
|
||||||
|
SetLastError(NTE_BAD_DATA);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
for (i=2; i<dwDataLen; i++)
|
for (i=2; i<dwDataLen; i++)
|
||||||
if (!abData[i])
|
if (!abData[i])
|
||||||
break;
|
break;
|
||||||
|
@ -2378,11 +2384,13 @@ BOOL WINAPI RSAENH_CPDecrypt(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTHASH hHash,
|
||||||
*pdwDataLen -= pbData[*pdwDataLen-1];
|
*pdwDataLen -= pbData[*pdwDataLen-1];
|
||||||
else {
|
else {
|
||||||
SetLastError(NTE_BAD_DATA);
|
SetLastError(NTE_BAD_DATA);
|
||||||
|
setup_key(pCryptKey);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SetLastError(NTE_BAD_DATA);
|
SetLastError(NTE_BAD_DATA);
|
||||||
|
setup_key(pCryptKey);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ reactos/dll/win32/riched20 # Synced to Wine-1.7.1
|
||||||
reactos/dll/win32/riched32 # Synced to Wine-1.7.1
|
reactos/dll/win32/riched32 # Synced to Wine-1.7.1
|
||||||
reactos/dll/win32/rpcrt4 # Synced to Wine-1.3.26
|
reactos/dll/win32/rpcrt4 # Synced to Wine-1.3.26
|
||||||
reactos/dll/win32/rsabase # Autosync
|
reactos/dll/win32/rsabase # Autosync
|
||||||
reactos/dll/win32/rsaenh # Synced to Wine-1.5.4
|
reactos/dll/win32/rsaenh # Synced to Wine-1.7.1
|
||||||
reactos/dll/win32/sccbase # Synced to Wine-1.5.19
|
reactos/dll/win32/sccbase # Synced to Wine-1.5.19
|
||||||
reactos/dll/win32/schannel # Synced to Wine-1.5.19
|
reactos/dll/win32/schannel # Synced to Wine-1.5.19
|
||||||
reactos/dll/win32/scrrun # Synced to Wine-1.7.1
|
reactos/dll/win32/scrrun # Synced to Wine-1.7.1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue