39 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
40 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
41 'C',
'r',
'y',
'p',
't',
'o',
'g',
'r',
'a',
'p',
'h',
'y',
'\\',
43 'E',
'n',
'c',
'o',
'd',
'i',
'n',
'g',
'T',
'y',
'p',
'e',
' ',
'0',
'\\',
44 'C',
'r',
'y',
'p',
't',
'S',
'I',
'P',
'D',
'l',
'l', 0 };
47 'P',
'u',
't',
'S',
'i',
'g',
'n',
'e',
'd',
'D',
'a',
't',
'a',
'M',
's',
'g',
'\\',0};
49 'G',
'e',
't',
'S',
'i',
'g',
'n',
'e',
'd',
'D',
'a',
't',
'a',
'M',
's',
'g',
'\\',0};
51 'R',
'e',
'm',
'o',
'v',
'e',
'S',
'i',
'g',
'n',
'e',
'd',
'D',
'a',
't',
'a',
'M',
's',
'g',
'\\',0};
53 'C',
'r',
'e',
'a',
't',
'e',
'I',
'n',
'd',
'i',
'r',
'e',
'c',
't',
'D',
'a',
't',
'a',
'\\',0};
55 'V',
'e',
'r',
'i',
'f',
'y',
'I',
'n',
'd',
'i',
'r',
'e',
'c',
't',
'D',
'a',
't',
'a',
'\\',0};
57 'I',
's',
'M',
'y',
'F',
'i',
'l',
'e',
'T',
'y',
'p',
'e',
'\\',0};
59 'I',
's',
'M',
'y',
'F',
'i',
'l',
'e',
'T',
'y',
'p',
'e',
'2',
'\\',0};
69 sprintf(
str,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
83 WCHAR szFullKey[ 0x100 ];
126#define CRYPT_SIPREMOVEPROV( key ) \
127 r = CRYPT_SIPDeleteFunction( pgProv, key); \
128 if (r != ERROR_SUCCESS) remove_error = r
138#undef CRYPT_SIPREMOVEPROV
158 WCHAR szFullKey[ 0x100 ];
211 TRACE(
"%p\n", psNewProv);
225 TRACE(
"%s %s %s %s %s\n",
232#define CRYPT_SIPADDPROV( key, field ) \
233 r = CRYPT_SIPWriteFunction( psNewProv->pgSubject, key, \
234 psNewProv->pwszDLLFileName, psNewProv->field); \
235 if (r != ERROR_SUCCESS) goto end_function
245#undef CRYPT_SIPADDPROV
268 size =
sizeof(dllName);
273 size =
sizeof(functionName);
317 static const GUID unknown = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
318 static const GUID cabGUID = { 0xc689aaba, 0x8e78, 0x11d0, {0x8c,0x47,0x00,0xc0,0x4f,0xc2,0x95,0xee }};
319 static const GUID catGUID = { 0xDE351A43, 0x8E59, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
321 static const BYTE cabHdr[] = {
'M',
'S',
'C',
'F' };
323 WCHAR szFullKey[ 0x100 ];
329 if (!pgSubject || (!
FileName && !hFileIn))
362 if (!
memcmp(
hdr, &dosHdr,
sizeof(dosHdr)))
370 if (!
memcmp(
hdr, cabHdr,
sizeof(cabHdr)))
382 TRACE(
"fileLen = %d\n", fileLen);
384 if (
hdr[1] < 0x80 && fileLen == 2 +
hdr[1])
391 else if (
hdr[1] == 0x80)
405 if (lenBytes == 1 && fileLen == 2 + lenBytes +
hdr[2])
412 else if (lenBytes == 2 && fileLen == 2 + lenBytes +
420 else if (fileLen > 0xffff)
460 bRet = isMy(
hFile, pgSubject);
527 WCHAR szFullKey[ 0x100 ];
571 0, 0, { (
DWORD_PTR)(__FILE__
": providers_cs") }
694 if (!pgSubject ||
dwFlags != 0 || !pSipDispatch)
721 TRACE(
"(%p %p %p)\n", pSubjectInfo, pcbIndirectData, pIndirectData);
723 if (!pSubjectInfo || !pSubjectInfo->
pgSubjectType || !pcbIndirectData)
729 ret = sip->
info.
pfCreate(pSubjectInfo, pcbIndirectData, pIndirectData);
743 TRACE(
"(%p %p %d %p %p)\n", pSubjectInfo, pdwEncodingType, dwIndex,
744 pcbSignedDataMsg, pbSignedDataMsg);
747 ret = sip->
info.
pfGet(pSubjectInfo, pdwEncodingType, dwIndex,
748 pcbSignedDataMsg, pbSignedDataMsg);
762 TRACE(
"(%p %d %p %d %p)\n", pSubjectInfo, pdwEncodingType, pdwIndex,
763 cbSignedDataMsg, pbSignedDataMsg);
766 ret = sip->
info.
pfPut(pSubjectInfo, pdwEncodingType, pdwIndex,
767 cbSignedDataMsg, pbSignedDataMsg);
781 TRACE(
"(%p %d)\n", pSubjectInfo, dwIndex);
798 TRACE(
"(%p %p)\n", pSubjectInfo, pIndirectData);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LPVOID WINAPI CryptMemAlloc(ULONG cbSize)
VOID WINAPI CryptMemFree(LPVOID pv)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
static void CRYPT_guid2wstr(const GUID *guid, LPWSTR wstr)
BOOL WINAPI CryptSIPRemoveProvider(GUID *pgProv)
static const WCHAR szRemoveSigned[]
BOOL WINAPI CryptSIPPutSignedDataMsg(SIP_SUBJECTINFO *pSubjectInfo, DWORD pdwEncodingType, DWORD *pdwIndex, DWORD cbSignedDataMsg, BYTE *pbSignedDataMsg)
BOOL WINAPI CryptSIPRetrieveSubjectGuidForCatalogFile(LPCWSTR filename, HANDLE handle, GUID *subject)
static const WCHAR szDllName[]
static const WCHAR szVerify[]
#define CRYPT_SIPREMOVEPROV(key)
static struct list providers
static CRITICAL_SECTION providers_cs
static void * CRYPT_LoadSIPFuncFromKey(HKEY key, HMODULE *pLib)
static const WCHAR szPutSigned[]
static const WCHAR szOID[]
static WINE_SIP_PROVIDER * CRYPT_GetCachedSIP(const GUID *pgSubject)
BOOL WINAPI CryptSIPRemoveSignedDataMsg(SIP_SUBJECTINFO *pSubjectInfo, DWORD dwIndex)
static const WCHAR szIsMyFile2[]
struct _WINE_SIP_PROVIDER WINE_SIP_PROVIDER
static BOOL CRYPT_IsSIPCached(const GUID *pgSubject)
static const WCHAR szIsMyFile[]
static LONG CRYPT_SIPWriteFunction(const GUID *guid, LPCWSTR szKey, LPCWSTR szDll, LPCWSTR szFunction)
static const WCHAR szFuncName[]
BOOL WINAPI CryptSIPRetrieveSubjectGuid(LPCWSTR FileName, HANDLE hFileIn, GUID *pgSubject)
static LONG CRYPT_OpenSIPFunctionKey(const GUID *guid, LPCWSTR function, HKEY *key)
BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO *pSubjectInfo, DWORD *pdwEncodingType, DWORD dwIndex, DWORD *pcbSignedDataMsg, BYTE *pbSignedDataMsg)
BOOL WINAPI CryptSIPCreateIndirectData(SIP_SUBJECTINFO *pSubjectInfo, DWORD *pcbIndirectData, SIP_INDIRECT_DATA *pIndirectData)
static BOOL CRYPT_LoadSIP(const GUID *pgSubject)
#define CRYPT_SIPADDPROV(key, field)
static CRITICAL_SECTION_DEBUG providers_cs_debug
static const WCHAR szCreate[]
BOOL WINAPI CryptSIPLoad(const GUID *pgSubject, DWORD dwFlags, SIP_DISPATCH_INFO *pSipDispatch)
static void * CRYPT_LoadSIPFunc(const GUID *pgSubject, LPCWSTR function, HMODULE *pLib)
BOOL WINAPI CryptSIPVerifyIndirectData(SIP_SUBJECTINFO *pSubjectInfo, SIP_INDIRECT_DATA *pIndirectData)
static LONG CRYPT_SIPDeleteFunction(const GUID *guid, LPCWSTR szKey)
BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv)
void crypt_sip_free(void)
static void CRYPT_CacheSIP(const GUID *pgSubject, SIP_DISPATCH_INFO *info)
static const WCHAR szGetSigned[]
#define ERROR_INVALID_PARAMETER
#define ReadFile(a, b, c, d, e)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
static void cleanup(void)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
BOOL WINAPI SetFilePointerEx(HANDLE hFile, LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER lpNewFilePointer, DWORD dwMoveMethod)
static const GUID catGUID
static const GUID cabGUID
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define sprintf(buf, format,...)
BOOL(WINAPI * pfnIsFileSupportedName)(WCHAR *, GUID *)
BOOL(WINAPI * pfnIsFileSupported)(HANDLE, GUID *)
#define SIP_MAX_MAGIC_NUMBER
#define IMAGE_DOS_SIGNATURE
#define IsEqualGUID(rguid1, rguid2)
static unsigned __int64 next
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
WCHAR * pwszCreateFuncName
WCHAR * pwszRemoveFuncName
WCHAR * pwszIsFunctionName
WCHAR * pwszIsFunctionNameFmt2
WCHAR * pwszVerifyFuncName
pCryptSIPVerifyIndirectData pfVerify
pCryptSIPRemoveSignedDataMsg pfRemove
pCryptSIPGetSignedDataMsg pfGet
pCryptSIPPutSignedDataMsg pfPut
pCryptSIPCreateIndirectData pfCreate
LIST_ENTRY ProcessLocksList
#define FIELD_OFFSET(t, f)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define TRUST_E_SUBJECT_FORM_UNKNOWN
#define HKEY_LOCAL_MACHINE