Changeset 21354 for trunk/src/crypt32/sip.c
- Timestamp:
- Feb 21, 2010, 5:32:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/crypt32/sip.c
r21311 r21354 21 21 #include <stdarg.h> 22 22 #include <stdio.h> 23 #include <string.h> 23 24 24 25 #define WINE_LARGE_INTEGER /* for QuadPart in LARGE_INTEGER */ … … 177 178 178 179 /* write the values */ 179 r = RegSetValueExW( hKey, szFuncName, 0, REG_SZ, ( constBYTE*) szFunction,180 r = RegSetValueExW( hKey, szFuncName, 0, REG_SZ, (BYTE*) szFunction, 180 181 ( lstrlenW( szFunction ) + 1 ) * sizeof (WCHAR) ); 181 182 if( r != ERROR_SUCCESS ) goto error_close_key; 182 r = RegSetValueExW( hKey, szDllName, 0, REG_SZ, ( constBYTE*) szDll,183 r = RegSetValueExW( hKey, szDllName, 0, REG_SZ, (BYTE*) szDll, 183 184 ( lstrlenW( szDll ) + 1) * sizeof (WCHAR) ); 184 185 … … 282 283 if (!lib) 283 284 goto end; 284 func = GetProcAddress(lib, functionName);285 func = (void*)GetProcAddress(lib, functionName); 285 286 if (func) 286 287 *pLib = lib; … … 456 457 { 457 458 HMODULE lib; 458 pfnIsFileSupported isMy = CRYPT_LoadSIPFuncFromKey(subKey,459 &lib);459 pfnIsFileSupported isMy = 460 (pfnIsFileSupported)CRYPT_LoadSIPFuncFromKey(subKey, &lib); 460 461 461 462 if (isMy) … … 494 495 { 495 496 HMODULE lib; 496 pfnIsFileSupportedName isMy2 = 497 pfnIsFileSupportedName isMy2 = (pfnIsFileSupportedName) 497 498 CRYPT_LoadSIPFuncFromKey(subKey, &lib); 498 499 … … 572 573 { &providers_cs_debug.ProcessLocksList, 573 574 &providers_cs_debug.ProcessLocksList }, 574 0, 0, { (DWORD _PTR)(__FILE__ ": providers_cs") }575 0, 0, { (DWORD)(DWORD_PTR)(__FILE__ ": providers_cs") } 575 576 }; 576 577 static RTL_CRITICAL_SECTION providers_cs = { &providers_cs_debug, -1, 0, 0, 0, 0 }; … … 584 585 prov->subject = *pgSubject; 585 586 prov->info = *info; 586 EnterCriticalSection( &providers_cs);587 EnterCriticalSection((CRITICAL_SECTION*)&providers_cs); 587 588 list_add_tail(&providers, &prov->entry); 588 LeaveCriticalSection( &providers_cs);589 LeaveCriticalSection((CRITICAL_SECTION*)&providers_cs); 589 590 } 590 591 } … … 594 595 WINE_SIP_PROVIDER *provider = NULL, *ret = NULL; 595 596 596 EnterCriticalSection( &providers_cs);597 EnterCriticalSection((CRITICAL_SECTION*)&providers_cs); 597 598 LIST_FOR_EACH_ENTRY(provider, &providers, WINE_SIP_PROVIDER, entry) 598 599 { … … 602 603 if (provider && IsEqualGUID(pgSubject, &provider->subject)) 603 604 ret = provider; 604 LeaveCriticalSection( &providers_cs);605 LeaveCriticalSection((CRITICAL_SECTION*)&providers_cs); 605 606 return ret; 606 607 } … … 631 632 HMODULE lib = NULL, temp = NULL; 632 633 633 sip.pfGet = CRYPT_LoadSIPFunc(pgSubject, szGetSigned, &lib);634 sip.pfGet = (pCryptSIPGetSignedDataMsg)CRYPT_LoadSIPFunc(pgSubject, szGetSigned, &lib); 634 635 if (!sip.pfGet) 635 636 goto error; 636 sip.pfPut = CRYPT_LoadSIPFunc(pgSubject, szPutSigned, &temp);637 sip.pfPut = (pCryptSIPPutSignedDataMsg)CRYPT_LoadSIPFunc(pgSubject, szPutSigned, &temp); 637 638 if (!sip.pfPut || temp != lib) 638 639 goto error; 639 640 FreeLibrary(temp); 640 sip.pfCreate = CRYPT_LoadSIPFunc(pgSubject, szCreate, &temp);641 sip.pfCreate = (pCryptSIPCreateIndirectData)CRYPT_LoadSIPFunc(pgSubject, szCreate, &temp); 641 642 if (!sip.pfCreate || temp != lib) 642 643 goto error; 643 644 FreeLibrary(temp); 644 sip.pfVerify = CRYPT_LoadSIPFunc(pgSubject, szVerify, &temp);645 sip.pfVerify = (pCryptSIPVerifyIndirectData)CRYPT_LoadSIPFunc(pgSubject, szVerify, &temp); 645 646 if (!sip.pfVerify || temp != lib) 646 647 goto error; 647 648 FreeLibrary(temp); 648 sip.pfRemove = CRYPT_LoadSIPFunc(pgSubject, szRemoveSigned, &temp);649 sip.pfRemove = (pCryptSIPRemoveSignedDataMsg)CRYPT_LoadSIPFunc(pgSubject, szRemoveSigned, &temp); 649 650 if (!sip.pfRemove || temp != lib) 650 651 goto error; … … 720 721 TRACE("(%p %p %p)\n", pSubjectInfo, pcbIndirectData, pIndirectData); 721 722 722 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) )723 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL) 723 724 ret = sip->info.pfCreate(pSubjectInfo, pcbIndirectData, pIndirectData); 724 725 TRACE("returning %d\n", ret); … … 738 739 pcbSignedDataMsg, pbSignedDataMsg); 739 740 740 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) )741 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL) 741 742 ret = sip->info.pfGet(pSubjectInfo, pdwEncodingType, dwIndex, 742 743 pcbSignedDataMsg, pbSignedDataMsg); … … 757 758 cbSignedDataMsg, pbSignedDataMsg); 758 759 759 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) )760 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL) 760 761 ret = sip->info.pfPut(pSubjectInfo, pdwEncodingType, pdwIndex, 761 762 cbSignedDataMsg, pbSignedDataMsg); … … 775 776 TRACE("(%p %d)\n", pSubjectInfo, dwIndex); 776 777 777 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) )778 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL) 778 779 ret = sip->info.pfRemove(pSubjectInfo, dwIndex); 779 780 TRACE("returning %d\n", ret); … … 792 793 TRACE("(%p %p)\n", pSubjectInfo, pIndirectData); 793 794 794 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) )795 if ((sip = CRYPT_GetCachedSIP(pSubjectInfo->pgSubjectType)) != NULL) 795 796 ret = sip->info.pfVerify(pSubjectInfo, pIndirectData); 796 797 TRACE("returning %d\n", ret);
Note:
See TracChangeset
for help on using the changeset viewer.