ReactOS 0.4.16-dev-2491-g3dc6630
register.c
Go to the documentation of this file.
1/*
2 * Register related wintrust functions
3 *
4 * Copyright 2006 Paul Vriens
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <stdarg.h>
22
23#include "windef.h"
24#include "winbase.h"
25#include "winerror.h"
26#include "winuser.h"
27#include "winreg.h"
28#include "winnls.h"
29#include "objbase.h"
30
31#include "guiddef.h"
32#include "wintrust.h"
33#include "softpub.h"
34#include "mssip.h"
35#include "wintrust_priv.h"
36#include "wine/debug.h"
37
39
47
49
51
54
57
61
64
65static const CRYPT_TRUST_REG_ENTRY NullCTRE = { 0, NULL, NULL };
66
67static const WCHAR Trust[] = {'S','o','f','t','w','a','r','e','\\',
68 'M','i','c','r','o','s','o','f','t','\\',
69 'C','r','y','p','t','o','g','r','a','p','h','y','\\',
70 'P','r','o','v','i','d','e','r','s','\\',
71 'T','r','u','s','t','\\', 0 };
72
73static const WCHAR Initialization[] = {'I','n','i','t','i','a','l','i','z','a','t','i','o','n','\\', 0};
74static const WCHAR Message[] = {'M','e','s','s','a','g','e','\\', 0};
75static const WCHAR Signature[] = {'S','i','g','n','a','t','u','r','e','\\', 0};
76static const WCHAR Certificate[] = {'C','e','r','t','i','f','i','c','a','t','e','\\', 0};
77static const WCHAR CertCheck[] = {'C','e','r','t','C','h','e','c','k','\\', 0};
78static const WCHAR FinalPolicy[] = {'F','i','n','a','l','P','o','l','i','c','y','\\', 0};
79static const WCHAR DiagnosticPolicy[] = {'D','i','a','g','n','o','s','t','i','c','P','o','l','i','c','y','\\', 0};
80static const WCHAR Cleanup[] = {'C','l','e','a','n','u','p','\\', 0};
81
82static const WCHAR DefaultId[] = {'D','e','f','a','u','l','t','I','d', 0};
83static const WCHAR Dll[] = {'$','D','L','L', 0};
84
85/***********************************************************************
86 * WINTRUST_InitRegStructs
87 *
88 * Helper function to allocate and initialize the members of the
89 * CRYPT_TRUST_REG_ENTRY structs.
90 */
91static void WINTRUST_InitRegStructs(void)
92{
93#define WINTRUST_INITREGENTRY( action, dllname, functionname ) \
94 action.cbStruct = sizeof(CRYPT_TRUST_REG_ENTRY); \
95 action.pwszDLLName = wcsdup(dllname); \
96 action.pwszFunctionName = wcsdup(functionname);
97
116
117#undef WINTRUST_INITREGENTRY
118}
119
120/***********************************************************************
121 * WINTRUST_FreeRegStructs
122 *
123 * Helper function to free 2 members of the CRYPT_TRUST_REG_ENTRY
124 * structs.
125 */
126static void WINTRUST_FreeRegStructs(void)
127{
128#define WINTRUST_FREEREGENTRY( action ) \
129 free(action.pwszDLLName); \
130 free(action.pwszFunctionName);
131
150
151#undef WINTRUST_FREEREGENTRY
152}
153
154/***********************************************************************
155 * WINTRUST_guid2wstr
156 *
157 * Create a wide-string from a GUID
158 *
159 */
160static void WINTRUST_Guid2Wstr(const GUID* pgActionID, WCHAR* GuidString)
161{
162 static const WCHAR wszFormat[] = {'{','%','0','8','l','X','-','%','0','4','X','-','%','0','4','X','-',
163 '%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X','%','0','2','X','%','0','2',
164 'X','%','0','2','X','%','0','2','X','}', 0};
165
166 wsprintfW(GuidString, wszFormat, pgActionID->Data1, pgActionID->Data2, pgActionID->Data3,
167 pgActionID->Data4[0], pgActionID->Data4[1], pgActionID->Data4[2], pgActionID->Data4[3],
168 pgActionID->Data4[4], pgActionID->Data4[5], pgActionID->Data4[6], pgActionID->Data4[7]);
169}
170
171/***********************************************************************
172 * WINTRUST_WriteProviderToReg
173 *
174 * Helper function for WintrustAddActionID
175 *
176 */
178 const WCHAR* FunctionType,
180{
181 static const WCHAR Function[] = {'$','F','u','n','c','t','i','o','n', 0};
182 WCHAR ProvKey[MAX_PATH];
183 HKEY Key;
184 LONG Res = ERROR_SUCCESS;
185
186 /* Create the needed key string */
187 ProvKey[0]='\0';
188 lstrcatW(ProvKey, Trust);
189 lstrcatW(ProvKey, FunctionType);
190 lstrcatW(ProvKey, GuidString);
191
192 if (!RegEntry.pwszDLLName || !RegEntry.pwszFunctionName)
194
195 Res = RegCreateKeyExW(HKEY_LOCAL_MACHINE, ProvKey, 0, NULL, 0, KEY_WRITE, NULL, &Key, NULL);
196 if (Res != ERROR_SUCCESS) goto error_close_key;
197
198 /* Create the $DLL entry */
199 Res = RegSetValueExW(Key, Dll, 0, REG_SZ, (BYTE*)RegEntry.pwszDLLName,
200 (lstrlenW(RegEntry.pwszDLLName) + 1)*sizeof(WCHAR));
201 if (Res != ERROR_SUCCESS) goto error_close_key;
202
203 /* Create the $Function entry */
204 Res = RegSetValueExW(Key, Function, 0, REG_SZ, (BYTE*)RegEntry.pwszFunctionName,
205 (lstrlenW(RegEntry.pwszFunctionName) + 1)*sizeof(WCHAR));
206
207error_close_key:
209
210 return Res;
211}
212
213/***********************************************************************
214 * WintrustAddActionID (WINTRUST.@)
215 *
216 * Add the definitions of the actions a Trust provider can perform to
217 * the registry.
218 *
219 * PARAMS
220 * pgActionID [I] Pointer to a GUID for the Trust provider.
221 * fdwFlags [I] Flag to indicate whether registry errors are passed on.
222 * psProvInfo [I] Pointer to a structure with information about DLL
223 * name and functions.
224 *
225 * RETURNS
226 * Success: TRUE.
227 * Failure: FALSE. (Use GetLastError() for more information)
228 *
229 * NOTES
230 * Adding definitions is basically only adding relevant information
231 * to the registry. No verification takes place whether a DLL or its
232 * entrypoints exist.
233 * Information in the registry will always be overwritten.
234 *
235 */
236BOOL WINAPI WintrustAddActionID( GUID* pgActionID, DWORD fdwFlags,
237 CRYPT_REGISTER_ACTIONID* psProvInfo)
238{
239 WCHAR GuidString[39];
240 LONG Res;
241 LONG WriteActionError = ERROR_SUCCESS;
242
243 TRACE("%s %lx %p\n", debugstr_guid(pgActionID), fdwFlags, psProvInfo);
244
245 /* Some sanity checks.
246 * We use the W2K3 last error as it makes more sense (W2K leaves the last error
247 * as is).
248 */
249 if (!pgActionID ||
250 !psProvInfo ||
251 (psProvInfo->cbStruct != sizeof(CRYPT_REGISTER_ACTIONID)))
252 {
254 return FALSE;
255 }
256
257 /* Create this string only once, instead of in the helper function */
258 WINTRUST_Guid2Wstr( pgActionID, GuidString);
259
260 /* Write the information to the registry */
262 if (Res != ERROR_SUCCESS) WriteActionError = Res;
264 if (Res != ERROR_SUCCESS) WriteActionError = Res;
266 if (Res != ERROR_SUCCESS) WriteActionError = Res;
268 if (Res != ERROR_SUCCESS) WriteActionError = Res;
270 if (Res != ERROR_SUCCESS) WriteActionError = Res;
272 if (Res != ERROR_SUCCESS) WriteActionError = Res;
274 if (Res != ERROR_SUCCESS) WriteActionError = Res;
276 if (Res != ERROR_SUCCESS) WriteActionError = Res;
277
278 /* Testing (by restricting access to the registry for some keys) shows that the last failing function
279 * will be used for last error.
280 * If the flag WT_ADD_ACTION_ID_RET_RESULT_FLAG is set and there are errors when adding the action
281 * we have to return FALSE. Errors includes both invalid entries as well as registry errors.
282 * Testing also showed that one error doesn't stop the registry writes. Every action will be dealt with.
283 */
284
285 if (WriteActionError != ERROR_SUCCESS)
286 {
287 SetLastError(WriteActionError);
288
289 if (fdwFlags == WT_ADD_ACTION_ID_RET_RESULT_FLAG)
290 return FALSE;
291 }
292
293 return TRUE;
294}
295
296/***********************************************************************
297 * WINTRUST_RemoveProviderFromReg
298 *
299 * Helper function for WintrustRemoveActionID
300 *
301 */
303 const WCHAR* FunctionType)
304{
305 WCHAR ProvKey[MAX_PATH];
306
307 /* Create the needed key string */
308 ProvKey[0]='\0';
309 lstrcatW(ProvKey, Trust);
310 lstrcatW(ProvKey, FunctionType);
311 lstrcatW(ProvKey, GuidString);
312
313 /* We don't care about success or failure */
315}
316
317/***********************************************************************
318 * WintrustRemoveActionID (WINTRUST.@)
319 *
320 * Remove the definitions of the actions a Trust provider can perform
321 * from the registry.
322 *
323 * PARAMS
324 * pgActionID [I] Pointer to a GUID for the Trust provider.
325 *
326 * RETURNS
327 * Success: TRUE. (Use GetLastError() for more information)
328 * Failure: FALSE. (Use GetLastError() for more information)
329 *
330 * NOTES
331 * Testing shows that WintrustRemoveActionID always returns TRUE and
332 * that a possible error should be retrieved via GetLastError().
333 * There are no checks if the definitions are in the registry.
334 */
336{
337 WCHAR GuidString[39];
338
339 TRACE("(%s)\n", debugstr_guid(pgActionID));
340
341 if (!pgActionID)
342 {
344 return TRUE;
345 }
346
347 /* Create this string only once, instead of in the helper function */
348 WINTRUST_Guid2Wstr( pgActionID, GuidString);
349
350 /* We don't care about success or failure */
359
360 return TRUE;
361}
362
363/***********************************************************************
364 * WINTRUST_WriteSingleUsageEntry
365 *
366 * Helper for WintrustAddDefaultForUsage, writes a single value and its
367 * data to:
368 *
369 * HKLM\Software\Microsoft\Cryptography\Trust\Usages<OID>
370 */
372 const WCHAR* Value,
373 WCHAR* Data)
374{
375 static const WCHAR Usages[] = {'U','s','a','g','e','s','\\', 0};
376 WCHAR* UsageKey;
377 HKEY Key;
378 LONG Res = ERROR_SUCCESS;
379 WCHAR* OIDW;
380 DWORD Len;
381
382 /* Turn OID into a wide-character string */
383 Len = MultiByteToWideChar( CP_ACP, 0, OID, -1, NULL, 0 );
384 OIDW = malloc( Len * sizeof(WCHAR) );
385 MultiByteToWideChar( CP_ACP, 0, OID, -1, OIDW, Len );
386
387 /* Allocate the needed space for UsageKey */
388 UsageKey = malloc((wcslen(Trust) + wcslen(Usages) + Len) * sizeof(WCHAR));
389 /* Create the key string */
390 lstrcpyW(UsageKey, Trust);
391 lstrcatW(UsageKey, Usages);
392 lstrcatW(UsageKey, OIDW);
393
394 Res = RegCreateKeyExW(HKEY_LOCAL_MACHINE, UsageKey, 0, NULL, 0, KEY_WRITE, NULL, &Key, NULL);
395 if (Res == ERROR_SUCCESS)
396 {
397 /* Create the Value entry */
398 Res = RegSetValueExW(Key, Value, 0, REG_SZ, (BYTE*)Data,
399 (lstrlenW(Data) + 1)*sizeof(WCHAR));
400 }
402
403 free(OIDW);
404 free(UsageKey);
405
406 return Res;
407}
408
409/***************************************************************************
410 * WINTRUST_RegisterGenVerifyV2
411 *
412 * Register WINTRUST_ACTION_GENERIC_VERIFY_V2 actions and usages.
413 *
414 * NOTES
415 * WINTRUST_ACTION_GENERIC_VERIFY_V2 ({00AAC56B-CD44-11D0-8CC2-00C04FC295EE}
416 * is defined in softpub.h
417 */
419{
420 BOOL RegisteredOK = TRUE;
421 static GUID ProvGUID = WINTRUST_ACTION_GENERIC_VERIFY_V2;
424 &ProvGUID,
425 NULL, /* No Dll provided */
426 NULL, /* No load callback function */
427 NULL }; /* No free callback function */
428
429 ProvInfo.cbStruct = sizeof(CRYPT_REGISTER_ACTIONID);
436 ProvInfo.sTestPolicyProvider = NullCTRE; /* No diagnostic policy */
438
440 RegisteredOK = FALSE;
441
442 if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo))
443 RegisteredOK = FALSE;
444
445 return RegisteredOK;
446}
447
448/***************************************************************************
449 * WINTRUST_RegisterPublishedSoftware
450 *
451 * Register WIN_SPUB_ACTION_PUBLISHED_SOFTWARE actions and usages.
452 *
453 * NOTES
454 * WIN_SPUB_ACTION_PUBLISHED_SOFTWARE ({64B9D180-8DA2-11CF-8736-00AA00A485EB})
455 * is defined in wintrust.h
456 */
458{
461
462 ProvInfo.cbStruct = sizeof(CRYPT_REGISTER_ACTIONID);
469 ProvInfo.sTestPolicyProvider = NullCTRE; /* No diagnostic policy */
471
472 if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo))
473 return FALSE;
474
475 return TRUE;
476}
477
478#define WIN_SPUB_ACTION_PUBLISHED_SOFTWARE_NOBADUI { 0xc6b2e8d0, 0xe005, 0x11cf, { 0xa1,0x34,0x00,0xc0,0x4f,0xd7,0xbf,0x43 }}
479
480/***************************************************************************
481 * WINTRUST_RegisterPublishedSoftwareNoBadUi
482 *
483 * Register WIN_SPUB_ACTION_PUBLISHED_SOFTWARE_NOBADUI actions and usages.
484 *
485 * NOTES
486 * WIN_SPUB_ACTION_PUBLISHED_SOFTWARE_NOBADUI ({C6B2E8D0-E005-11CF-A134-00C04FD7BF43})
487 * is not defined in any include file. (FIXME: Find out if the name is correct).
488 */
490{
493
494 ProvInfo.cbStruct = sizeof(CRYPT_REGISTER_ACTIONID);
501 ProvInfo.sTestPolicyProvider = NullCTRE; /* No diagnostic policy */
503
504 if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo))
505 return FALSE;
506
507 return TRUE;
508}
509
510/***************************************************************************
511 * WINTRUST_RegisterGenCertVerify
512 *
513 * Register WINTRUST_ACTION_GENERIC_CERT_VERIFY actions and usages.
514 *
515 * NOTES
516 * WINTRUST_ACTION_GENERIC_CERT_VERIFY ({189A3842-3041-11D1-85E1-00C04FC295EE})
517 * is defined in softpub.h
518 */
520{
523
524 ProvInfo.cbStruct = sizeof(CRYPT_REGISTER_ACTIONID);
531 ProvInfo.sTestPolicyProvider = NullCTRE; /* No diagnostic policy */
533
534 if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo))
535 return FALSE;
536
537 return TRUE;
538}
539
540/***************************************************************************
541 * WINTRUST_RegisterTrustProviderTest
542 *
543 * Register WINTRUST_ACTION_TRUSTPROVIDER_TEST actions and usages.
544 *
545 * NOTES
546 * WINTRUST_ACTION_TRUSTPROVIDER_TEST ({573E31F8-DDBA-11D0-8CCB-00C04FC295EE})
547 * is defined in softpub.h
548 */
550{
553
554 ProvInfo.cbStruct = sizeof(CRYPT_REGISTER_ACTIONID);
563
564 if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo))
565 return FALSE;
566
567 return TRUE;
568}
569
570/***************************************************************************
571 * WINTRUST_RegisterHttpsProv
572 *
573 * Register HTTPSPROV_ACTION actions and usages.
574 *
575 * NOTES
576 * HTTPSPROV_ACTION ({573E31F8-AABA-11D0-8CCB-00C04FC295EE})
577 * is defined in softpub.h
578 */
580{
581 BOOL RegisteredOK = TRUE;
582 static CHAR SoftpubLoadUsage[] = "SoftpubLoadDefUsageCallData";
583 static CHAR SoftpubFreeUsage[] = "SoftpubFreeDefUsageCallData";
584 static GUID ProvGUID = HTTPSPROV_ACTION;
587 &ProvGUID,
588 NULL, /* Will be filled later */
589 SoftpubLoadUsage,
590 SoftpubFreeUsage };
591
592 ProvInfo.cbStruct = sizeof(CRYPT_REGISTER_ACTIONID);
599 ProvInfo.sTestPolicyProvider = NullCTRE; /* No diagnostic policy */
601
603
605 RegisteredOK = FALSE;
607 RegisteredOK = FALSE;
609 RegisteredOK = FALSE;
611 RegisteredOK = FALSE;
612
613 free(DefUsage.pwszDllName);
614
615 if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo))
616 RegisteredOK = FALSE;
617
618 return RegisteredOK;
619}
620
621/***************************************************************************
622 * WINTRUST_RegisterOfficeSignVerify
623 *
624 * Register OFFICESIGN_ACTION_VERIFY actions and usages.
625 *
626 * NOTES
627 * OFFICESIGN_ACTION_VERIFY ({5555C2CD-17FB-11D1-85C4-00C04FC295EE})
628 * is defined in softpub.h
629 */
631{
632 static GUID ProvGUID = OFFICESIGN_ACTION_VERIFY;
634
635 ProvInfo.cbStruct = sizeof(CRYPT_REGISTER_ACTIONID);
642 ProvInfo.sTestPolicyProvider = NullCTRE; /* No diagnostic policy */
644
645
646 if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo))
647 return FALSE;
648
649 return TRUE;
650}
651
652/***************************************************************************
653 * WINTRUST_RegisterDriverVerify
654 *
655 * Register DRIVER_ACTION_VERIFY actions and usages.
656 *
657 * NOTES
658 * DRIVER_ACTION_VERIFY ({F750E6C3-38EE-11D1-85E5-00C04FC295EE})
659 * is defined in softpub.h
660 */
662{
663 static GUID ProvGUID = DRIVER_ACTION_VERIFY;
665
666 ProvInfo.cbStruct = sizeof(CRYPT_REGISTER_ACTIONID);
673 ProvInfo.sTestPolicyProvider = NullCTRE; /* No diagnostic policy */
675
676
677 if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo))
678 return FALSE;
679
680 return TRUE;
681}
682
683/***************************************************************************
684 * WINTRUST_RegisterGenChainVerify
685 *
686 * Register WINTRUST_ACTION_GENERIC_CHAIN_VERIFY actions and usages.
687 *
688 * NOTES
689 * WINTRUST_ACTION_GENERIC_CHAIN_VERIFY ({FC451C16-AC75-11D1-B4B8-00C04FB66EA0})
690 * is defined in softpub.h
691 */
693{
696
697 ProvInfo.cbStruct = sizeof(CRYPT_REGISTER_ACTIONID);
704 ProvInfo.sTestPolicyProvider = NullCTRE; /* No diagnostic policy */
706
707 if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo))
708 return FALSE;
709
710 return TRUE;
711}
712
713/***********************************************************************
714 * WintrustAddDefaultForUsage (WINTRUST.@)
715 *
716 * Write OID and callback functions to the registry.
717 *
718 * PARAMS
719 * pszUsageOID [I] Pointer to a GUID.
720 * psDefUsage [I] Pointer to a structure that specifies the callback functions.
721 *
722 * RETURNS
723 * Success: TRUE.
724 * Failure: FALSE.
725 *
726 * NOTES
727 * WintrustAddDefaultForUsage will only return TRUE or FALSE, no last
728 * error is set, not even when the registry cannot be written to.
729 */
730BOOL WINAPI WintrustAddDefaultForUsage(const char *pszUsageOID,
731 CRYPT_PROVIDER_REGDEFUSAGE *psDefUsage)
732{
733 static const WCHAR CBAlloc[] = {'C','a','l','l','b','a','c','k','A','l','l','o','c','F','u','n','c','t','i','o','n', 0};
734 static const WCHAR CBFree[] = {'C','a','l','l','b','a','c','k','F','r','e','e','F','u','n','c','t','i','o','n', 0};
735 LONG Res = ERROR_SUCCESS;
736 LONG WriteUsageError = ERROR_SUCCESS;
737 DWORD Len;
738 WCHAR GuidString[39];
739
740 TRACE("(%s %p)\n", debugstr_a(pszUsageOID), psDefUsage);
741
742 /* Some sanity checks. */
743 if (!pszUsageOID ||
744 !psDefUsage ||
745 !psDefUsage->pgActionID ||
746 (psDefUsage->cbStruct != sizeof(CRYPT_PROVIDER_REGDEFUSAGE)))
747 {
749 return FALSE;
750 }
751
752 if (psDefUsage->pwszDllName)
753 {
754 Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, Dll, psDefUsage->pwszDllName);
755 if (Res != ERROR_SUCCESS) WriteUsageError = Res;
756 }
757 if (psDefUsage->pwszLoadCallbackDataFunctionName)
758 {
759 WCHAR* CallbackW;
760
762 CallbackW = malloc( Len * sizeof(WCHAR) );
763 MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszLoadCallbackDataFunctionName, -1, CallbackW, Len );
764
765 Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, CBAlloc, CallbackW);
766 if (Res != ERROR_SUCCESS) WriteUsageError = Res;
767
768 free(CallbackW);
769 }
770 if (psDefUsage->pwszFreeCallbackDataFunctionName)
771 {
772 WCHAR* CallbackW;
773
775 CallbackW = malloc( Len * sizeof(WCHAR) );
776 MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszFreeCallbackDataFunctionName, -1, CallbackW, Len );
777
778 Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, CBFree, CallbackW);
779 if (Res != ERROR_SUCCESS) WriteUsageError = Res;
780
781 free(CallbackW);
782 }
783
786 if (Res != ERROR_SUCCESS) WriteUsageError = Res;
787
788 if (WriteUsageError != ERROR_SUCCESS)
789 return FALSE;
790
791 return TRUE;
792}
793
795{
796 WCHAR ProvKey[MAX_PATH], DllName[MAX_PATH];
798 HKEY Key;
799 LONG Res = ERROR_SUCCESS;
800 DWORD Size;
801 HMODULE Lib;
802 FARPROC Func = NULL;
803
804 /* Create the needed key string */
805 ProvKey[0]='\0';
806 lstrcatW(ProvKey, Trust);
807 lstrcatW(ProvKey, FunctionType);
808 lstrcatW(ProvKey, GuidString);
809
810 Res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, ProvKey, 0, KEY_READ, &Key);
811 if (Res != ERROR_SUCCESS) return NULL;
812
813 /* Read the $DLL entry */
814 Size = sizeof(DllName);
815 Res = RegQueryValueExW(Key, Dll, NULL, NULL, (LPBYTE)DllName, &Size);
816 if (Res != ERROR_SUCCESS) goto error_close_key;
817
818 /* Read the $Function entry */
819 Size = sizeof(FunctionName);
820 Res = RegQueryValueExA(Key, "$Function", NULL, NULL, (LPBYTE)FunctionName, &Size);
821 if (Res != ERROR_SUCCESS) goto error_close_key;
822
823 /* Load the library - there appears to be no way to close a provider, so
824 * just leak the module handle.
825 */
826 Lib = LoadLibraryW(DllName);
828
829error_close_key:
831
832 return Func;
833}
834
837{
838 0, 0, &cache_cs,
840 0, 0, { (DWORD_PTR)(__FILE__ ": cache_cs") }
841};
842static CRITICAL_SECTION cache_cs = { &cache_cs_debug, -1, 0, 0, 0, 0 };
843
845{
848}
850static unsigned int provider_cache_size;
851
853{
854 return calloc(1, cb);
855}
856
857static void WINAPI WINTRUST_Free(void *p)
858{
859 free(p);
860}
861
862/***********************************************************************
863 * WintrustLoadFunctionPointers (WINTRUST.@)
864 */
867{
868 WCHAR GuidString[39];
869 BOOL cached = FALSE;
870 unsigned int i;
871
872 TRACE("(%s %p)\n", debugstr_guid(pgActionID), pPfns);
873
874 if (!pPfns) return FALSE;
875 if (!pgActionID)
876 {
878 return FALSE;
879 }
880 if (pPfns->cbStruct != sizeof(CRYPT_PROVIDER_FUNCTIONS)) return FALSE;
881
883 for (i = 0; i < provider_cache_size; ++i)
884 {
885 if (IsEqualGUID( &provider_cache[i].guid, pgActionID ))
886 {
887 TRACE( "Using cached data.\n" );
888 *pPfns = provider_cache[i].provider_functions;
889 cached = TRUE;
890 break;
891 }
892 }
894 if (cached) return TRUE;
895
896 /* Create this string only once, instead of in the helper function */
897 WINTRUST_Guid2Wstr( pgActionID, GuidString);
898
899 /* Get the function pointers from the registry, where applicable */
900 pPfns->pfnAlloc = WINTRUST_Alloc;
901 pPfns->pfnFree = WINTRUST_Free;
906 pPfns->psUIpfns = NULL;
915
917 for (i = 0; i < provider_cache_size; ++i)
918 if (IsEqualGUID( &provider_cache[i].guid, pgActionID )) break;
919
920 if (i == provider_cache_size)
921 {
922 struct provider_cache_entry *new;
923
924 new = realloc( provider_cache, (provider_cache_size + 1) * sizeof(*new) );
925 if (new)
926 {
927 provider_cache = new;
928 provider_cache[provider_cache_size].guid = *pgActionID;
929 provider_cache[provider_cache_size].provider_functions = *pPfns;
931 }
932 }
934
935 return TRUE;
936}
937
938/***********************************************************************
939 * WINTRUST_SIPPAddProvider
940 *
941 * Helper for DllRegisterServer.
942 */
943static BOOL WINTRUST_SIPPAddProvider(GUID* Subject, WCHAR* MagicNumber)
944{
946 {'C','r','y','p','t','S','I','P','G','e','t','S','i','g','n','e','d','D','a','t','a','M','s','g', 0};
948 {'C','r','y','p','t','S','I','P','P','u','t','S','i','g','n','e','d','D','a','t','a','M','s','g', 0};
950 {'C','r','y','p','t','S','I','P','C','r','e','a','t','e','I','n','d','i','r','e','c','t','D','a','t','a', 0};
952 {'C','r','y','p','t','S','I','P','V','e','r','i','f','y','I','n','d','i','r','e','c','t','D','a','t','a', 0};
954 {'C','r','y','p','t','S','I','P','R','e','m','o','v','e','S','i','g','n','e','d','D','a','t','a','M','s','g', 0};
955 SIP_ADD_NEWPROVIDER NewProv;
956 BOOL Ret;
957
958 /* Clear and initialize the structure */
959 memset(&NewProv, 0, sizeof(SIP_ADD_NEWPROVIDER));
960 NewProv.cbStruct = sizeof(SIP_ADD_NEWPROVIDER);
962 /* Fill the structure */
963 NewProv.pgSubject = Subject;
964 NewProv.pwszMagicNumber = MagicNumber;
965 NewProv.pwszIsFunctionName = NULL;
972 NewProv.pwszGetCapFuncName = NULL;
973
974 Ret = CryptSIPAddProvider(&NewProv);
975
976 free(NewProv.pwszDLLFileName);
977
978 return Ret;
979}
980
981/***********************************************************************
982 * DllRegisterServer (WINTRUST.@)
983 */
985{
986 static const CHAR SpcPeImageDataEncode[] = "WVTAsn1SpcPeImageDataEncode";
987 static const CHAR SpcPeImageDataDecode[] = "WVTAsn1SpcPeImageDataDecode";
988 static const CHAR SpcLinkEncode[] = "WVTAsn1SpcLinkEncode";
989 static const CHAR SpcLinkDecode[] = "WVTAsn1SpcLinkDecode";
990 static const CHAR SpcSigInfoEncode[] = "WVTAsn1SpcSigInfoEncode";
991 static const CHAR SpcSigInfoDecode[] = "WVTAsn1SpcSigInfoDecode";
992 static const CHAR SpcIndirectDataContentEncode[] = "WVTAsn1SpcIndirectDataContentEncode";
993 static const CHAR SpcIndirectDataContentDecode[] = "WVTAsn1SpcIndirectDataContentDecode";
994 static const CHAR SpcSpAgencyInfoEncode[] = "WVTAsn1SpcSpAgencyInfoEncode";
995 static const CHAR SpcSpAgencyInfoDecode[] = "WVTAsn1SpcSpAgencyInfoDecode";
996 static const CHAR SpcMinimalCriteriaInfoEncode[] = "WVTAsn1SpcMinimalCriteriaInfoEncode";
997 static const CHAR SpcMinimalCriteriaInfoDecode[] = "WVTAsn1SpcMinimalCriteriaInfoDecode";
998 static const CHAR SpcFinancialCriteriaInfoEncode[] = "WVTAsn1SpcFinancialCriteriaInfoEncode";
999 static const CHAR SpcFinancialCriteriaInfoDecode[] = "WVTAsn1SpcFinancialCriteriaInfoDecode";
1000 static const CHAR SpcStatementTypeEncode[] = "WVTAsn1SpcStatementTypeEncode";
1001 static const CHAR SpcStatementTypeDecode[] = "WVTAsn1SpcStatementTypeDecode";
1002 static const CHAR CatNameValueEncode[] = "WVTAsn1CatNameValueEncode";
1003 static const CHAR CatNameValueDecode[] = "WVTAsn1CatNameValueDecode";
1004 static const CHAR CatMemberInfoEncode[] = "WVTAsn1CatMemberInfoEncode";
1005 static const CHAR CatMemberInfoDecode[] = "WVTAsn1CatMemberInfoDecode";
1006 static const CHAR SpcSpOpusInfoEncode[] = "WVTAsn1SpcSpOpusInfoEncode";
1007 static const CHAR SpcSpOpusInfoDecode[] = "WVTAsn1SpcSpOpusInfoDecode";
1008 static GUID Unknown1 = { 0xDE351A42, 0x8E59, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
1009 static GUID Unknown2 = { 0xC689AABA, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
1010 static GUID Unknown3 = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
1011 static GUID Unknown4 = { 0xC689AAB9, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
1012 static GUID Unknown5 = { 0xDE351A43, 0x8E59, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
1013 static GUID Unknown6 = { 0x9BA61D3F, 0xE73A, 0x11D0, { 0x8C,0xD2,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
1014 static WCHAR MagicNumber2[] = {'M','S','C','F', 0};
1015 static WCHAR MagicNumber3[] = {'0','x','0','0','0','0','4','5','5','0', 0};
1016 static WCHAR CafeBabe[] = {'0','x','c','a','f','e','b','a','b','e', 0};
1017
1018 HRESULT CryptRegisterRes = S_OK;
1019 HRESULT TrustProviderRes = S_OK;
1020 HRESULT SIPAddProviderRes = S_OK;
1021 HCRYPTPROV crypt_provider;
1022 BOOL ret;
1023
1024 TRACE("\n");
1025
1026 /* Testing on native shows that when an error is encountered in one of the CryptRegisterOIDFunction calls
1027 * the rest of these calls are skipped. Registering is however continued for the trust providers.
1028 *
1029 * We are not totally in line with native as all decoding functions are registered after all encoding
1030 * functions there.
1031 */
1032#define WINTRUST_REGISTEROID( oid, encode_funcname, decode_funcname ) \
1033 do { \
1034 if (!CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_ENCODE_OBJECT_FUNC, oid, SP_POLICY_PROVIDER_DLL_NAME, encode_funcname)) \
1035 { \
1036 CryptRegisterRes = HRESULT_FROM_WIN32(GetLastError()); \
1037 goto add_trust_providers; \
1038 } \
1039 if (!CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_DECODE_OBJECT_FUNC, oid, SP_POLICY_PROVIDER_DLL_NAME, decode_funcname)) \
1040 { \
1041 CryptRegisterRes = HRESULT_FROM_WIN32(GetLastError()); \
1042 goto add_trust_providers; \
1043 } \
1044 } while (0)
1045
1046 WINTRUST_REGISTEROID(SPC_PE_IMAGE_DATA_OBJID, SpcPeImageDataEncode, SpcPeImageDataDecode);
1047 WINTRUST_REGISTEROID(SPC_PE_IMAGE_DATA_STRUCT, SpcPeImageDataEncode, SpcPeImageDataDecode);
1048 WINTRUST_REGISTEROID(SPC_CAB_DATA_OBJID, SpcLinkEncode, SpcLinkDecode);
1049 WINTRUST_REGISTEROID(SPC_CAB_DATA_STRUCT, SpcLinkEncode, SpcLinkDecode);
1050 WINTRUST_REGISTEROID(SPC_JAVA_CLASS_DATA_OBJID, SpcLinkEncode, SpcLinkDecode);
1051 WINTRUST_REGISTEROID(SPC_JAVA_CLASS_DATA_STRUCT, SpcLinkEncode, SpcLinkDecode);
1052 WINTRUST_REGISTEROID(SPC_LINK_OBJID, SpcLinkEncode, SpcLinkDecode);
1053 WINTRUST_REGISTEROID(SPC_LINK_STRUCT, SpcLinkEncode, SpcLinkDecode);
1054 WINTRUST_REGISTEROID(SPC_SIGINFO_OBJID, SpcSigInfoEncode, SpcSigInfoDecode);
1055 WINTRUST_REGISTEROID(SPC_SIGINFO_STRUCT, SpcSigInfoEncode, SpcSigInfoDecode);
1056 WINTRUST_REGISTEROID(SPC_INDIRECT_DATA_OBJID, SpcIndirectDataContentEncode, SpcIndirectDataContentDecode);
1057 WINTRUST_REGISTEROID(SPC_INDIRECT_DATA_CONTENT_STRUCT, SpcIndirectDataContentEncode, SpcIndirectDataContentDecode);
1058 WINTRUST_REGISTEROID(SPC_SP_AGENCY_INFO_OBJID, SpcSpAgencyInfoEncode, SpcSpAgencyInfoDecode);
1059 WINTRUST_REGISTEROID(SPC_SP_AGENCY_INFO_STRUCT, SpcSpAgencyInfoEncode, SpcSpAgencyInfoDecode);
1060 WINTRUST_REGISTEROID(SPC_MINIMAL_CRITERIA_OBJID, SpcMinimalCriteriaInfoEncode, SpcMinimalCriteriaInfoDecode);
1061 WINTRUST_REGISTEROID(SPC_MINIMAL_CRITERIA_STRUCT, SpcMinimalCriteriaInfoEncode, SpcMinimalCriteriaInfoDecode);
1062 WINTRUST_REGISTEROID(SPC_FINANCIAL_CRITERIA_OBJID, SpcFinancialCriteriaInfoEncode, SpcFinancialCriteriaInfoDecode);
1063 WINTRUST_REGISTEROID(SPC_FINANCIAL_CRITERIA_STRUCT, SpcFinancialCriteriaInfoEncode, SpcFinancialCriteriaInfoDecode);
1064 WINTRUST_REGISTEROID(SPC_STATEMENT_TYPE_OBJID, SpcStatementTypeEncode, SpcStatementTypeDecode);
1065 WINTRUST_REGISTEROID(SPC_STATEMENT_TYPE_STRUCT, SpcStatementTypeEncode, SpcStatementTypeDecode);
1066 WINTRUST_REGISTEROID(CAT_NAMEVALUE_OBJID, CatNameValueEncode, CatNameValueDecode);
1067 WINTRUST_REGISTEROID(CAT_NAMEVALUE_STRUCT, CatNameValueEncode, CatNameValueDecode);
1068 WINTRUST_REGISTEROID(CAT_MEMBERINFO_OBJID, CatMemberInfoEncode, CatMemberInfoDecode);
1069 WINTRUST_REGISTEROID(CAT_MEMBERINFO_STRUCT, CatMemberInfoEncode, CatMemberInfoDecode);
1070 WINTRUST_REGISTEROID(SPC_SP_OPUS_INFO_OBJID, SpcSpOpusInfoEncode, SpcSpOpusInfoDecode);
1071 WINTRUST_REGISTEROID(SPC_SP_OPUS_INFO_STRUCT, SpcSpOpusInfoEncode, SpcSpOpusInfoDecode);
1072
1073#undef WINTRUST_REGISTEROID
1074
1075add_trust_providers:
1076
1077 /* Testing on W2K3 shows:
1078 * All registry writes are tried. If one fails this part will return S_FALSE.
1079 *
1080 * Last error is set to the last error encountered, regardless if the first
1081 * part failed or not.
1082 */
1083
1084 /* Create the necessary action registry structures */
1086
1087 /* Register several Trust Provider actions */
1089 TrustProviderRes = S_FALSE;
1091 TrustProviderRes = S_FALSE;
1093 TrustProviderRes = S_FALSE;
1095 TrustProviderRes = S_FALSE;
1097 TrustProviderRes = S_FALSE;
1099 TrustProviderRes = S_FALSE;
1101 TrustProviderRes = S_FALSE;
1103 TrustProviderRes = S_FALSE;
1105 TrustProviderRes = S_FALSE;
1106
1107 /* Free the registry structures */
1109
1110 /* Testing on W2K3 shows:
1111 * All registry writes are tried. If one fails this part will return S_FALSE.
1112 *
1113 * Last error is set to the last error encountered, regardless if the previous
1114 * parts failed or not.
1115 */
1116
1117 if (!WINTRUST_SIPPAddProvider(&Unknown1, NULL))
1118 SIPAddProviderRes = S_FALSE;
1119 if (!WINTRUST_SIPPAddProvider(&Unknown2, MagicNumber2))
1120 SIPAddProviderRes = S_FALSE;
1121 if (!WINTRUST_SIPPAddProvider(&Unknown3, MagicNumber3))
1122 SIPAddProviderRes = S_FALSE;
1123 if (!WINTRUST_SIPPAddProvider(&Unknown4, CafeBabe))
1124 SIPAddProviderRes = S_FALSE;
1125 if (!WINTRUST_SIPPAddProvider(&Unknown5, CafeBabe))
1126 SIPAddProviderRes = S_FALSE;
1127 if (!WINTRUST_SIPPAddProvider(&Unknown6, CafeBabe))
1128 SIPAddProviderRes = S_FALSE;
1129
1130 /* Native does a CryptSIPRemoveProvider here for {941C2937-1292-11D1-85BE-00C04FC295EE}.
1131 * This SIP Provider is however not found on up-to-date window install and native will
1132 * set the last error to ERROR_FILE_NOT_FOUND.
1133 * Wine has the last error set to ERROR_INVALID_PARAMETER. There shouldn't be an app
1134 * depending on this last error though so there is no need to imitate native to the full extent.
1135 *
1136 * (The ERROR_INVALID_PARAMETER for Wine it totally valid as we (and native) do register
1137 * a trust provider without a diagnostic policy).
1138 */
1139
1140 /* Create a dummy context to force creation of the MachineGuid registry key. */
1142 if (ret) CryptReleaseContext(crypt_provider, 0);
1143 else ERR("Failed to acquire cryptographic context: %lu\n", GetLastError());
1144
1145 /* If CryptRegisterRes is not S_OK it will always overrule the return value. */
1146 if (CryptRegisterRes != S_OK)
1147 return CryptRegisterRes;
1148 else if (SIPAddProviderRes == S_OK)
1149 return TrustProviderRes;
1150 else
1151 return SIPAddProviderRes;
1152}
1153
1154/***********************************************************************
1155 * DllUnregisterServer (WINTRUST.@)
1156 */
1158{
1159 FIXME("stub\n");
1160 return S_OK;
1161}
1162
1163/***********************************************************************
1164 * SoftpubDllRegisterServer (WINTRUST.@)
1165 *
1166 * Registers softpub.dll
1167 *
1168 * PARAMS
1169 *
1170 * RETURNS
1171 * Success: S_OK.
1172 * Failure: S_FALSE. (See also GetLastError()).
1173 *
1174 * NOTES
1175 * DllRegisterServer in softpub.dll will call this function.
1176 * See comments in DllRegisterServer.
1177 */
1179{
1180 HRESULT TrustProviderRes = S_OK;
1181
1182 TRACE("\n");
1183
1184 /* Create the necessary action registry structures */
1186
1187 /* Register several Trust Provider actions */
1189 TrustProviderRes = S_FALSE;
1191 TrustProviderRes = S_FALSE;
1193 TrustProviderRes = S_FALSE;
1195 TrustProviderRes = S_FALSE;
1197 TrustProviderRes = S_FALSE;
1199 TrustProviderRes = S_FALSE;
1201 TrustProviderRes = S_FALSE;
1203 TrustProviderRes = S_FALSE;
1205 TrustProviderRes = S_FALSE;
1206
1207 /* Free the registry structures */
1209
1210 return TrustProviderRes;
1211}
1212
1213/***********************************************************************
1214 * SoftpubDllUnregisterServer (WINTRUST.@)
1215 */
1217{
1218 FIXME("stub\n");
1219 return S_OK;
1220}
1221
1222/***********************************************************************
1223 * mscat32DllRegisterServer (WINTRUST.@)
1224 */
1226{
1227 FIXME("stub\n");
1228 return S_OK;
1229}
1230
1231/***********************************************************************
1232 * mscat32DllUnregisterServer (WINTRUST.@)
1233 */
1235{
1236 FIXME("stub\n");
1237 return S_OK;
1238}
1239
1240/***********************************************************************
1241 * mssip32DllRegisterServer (WINTRUST.@)
1242 */
1244{
1245 FIXME("stub\n");
1246 return S_OK;
1247}
1248
1249/***********************************************************************
1250 * mssip32DllUnregisterServer (WINTRUST.@)
1251 */
1253{
1254 FIXME("stub\n");
1255 return S_OK;
1256}
PRTL_UNICODE_STRING_BUFFER PULONG PULONG Unknown4
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Definition: acpixf.h:1279
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
#define RegCloseKey(hKey)
Definition: registry.h:49
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
Definition: cdrom.h:1156
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD IN DWORD IN DWORD IN DWORD Unknown6
Definition: conport.c:40
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD IN DWORD IN DWORD Unknown5
Definition: conport.c:39
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:37
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define Len
Definition: deflate.h:82
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1239
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4009
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
BOOL WINAPI CryptReleaseContext(HCRYPTPROV hProv, DWORD dwFlags)
Definition: crypt.c:661
BOOL WINAPI CryptAcquireContextW(HCRYPTPROV *phProv, LPCWSTR pszContainer, LPCWSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
Definition: crypt.c:358
BOOL WINAPI CryptSIPPutSignedDataMsg(SIP_SUBJECTINFO *pSubjectInfo, DWORD pdwEncodingType, DWORD *pdwIndex, DWORD cbSignedDataMsg, BYTE *pbSignedDataMsg)
Definition: sip.c:756
BOOL WINAPI CryptSIPRemoveSignedDataMsg(SIP_SUBJECTINFO *pSubjectInfo, DWORD dwIndex)
Definition: sip.c:775
BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO *pSubjectInfo, DWORD *pdwEncodingType, DWORD dwIndex, DWORD *pcbSignedDataMsg, BYTE *pbSignedDataMsg)
Definition: sip.c:737
BOOL WINAPI CryptSIPCreateIndirectData(SIP_SUBJECTINFO *pSubjectInfo, DWORD *pcbIndirectData, SIP_INDIRECT_DATA *pIndirectData)
Definition: sip.c:715
BOOL WINAPI CryptSIPVerifyIndirectData(SIP_SUBJECTINFO *pSubjectInfo, SIP_INDIRECT_DATA *pIndirectData)
Definition: sip.c:792
BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv)
Definition: sip.c:207
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
int(* FARPROC)()
Definition: compat.h:36
#define CP_ACP
Definition: compat.h:109
#define SetLastError(x)
Definition: compat.h:752
#define GetProcAddress(x, y)
Definition: compat.h:753
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
#define MultiByteToWideChar
Definition: compat.h:110
#define LoadLibraryW(x)
Definition: compat.h:747
#define lstrlenW
Definition: compat.h:750
GUID guid
Definition: version.c:147
static MonoProfilerRuntimeShutdownBeginCallback cb
Definition: metahost.c:118
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
static void WINAPI WINTRUST_Free(void *p)
Definition: register.c:857
static const CRYPT_TRUST_REG_ENTRY NullCTRE
Definition: register.c:65
static const WCHAR FinalPolicy[]
Definition: register.c:78
static const WCHAR CertCheck[]
Definition: register.c:77
static BOOL WINTRUST_SIPPAddProvider(GUID *Subject, WCHAR *MagicNumber)
Definition: register.c:943
static CRYPT_TRUST_REG_ENTRY SoftpubCertificate
Definition: register.c:43
static const WCHAR Dll[]
Definition: register.c:83
static void *WINAPI WINTRUST_Alloc(DWORD cb)
Definition: register.c:852
static LONG WINTRUST_WriteSingleUsageEntry(LPCSTR OID, const WCHAR *Value, WCHAR *Data)
Definition: register.c:371
HRESULT WINAPI mssip32DllUnregisterServer(void)
Definition: register.c:1252
static struct provider_cache_entry * provider_cache
static void WINTRUST_Guid2Wstr(const GUID *pgActionID, WCHAR *GuidString)
Definition: register.c:160
BOOL WINAPI WintrustLoadFunctionPointers(GUID *pgActionID, CRYPT_PROVIDER_FUNCTIONS *pPfns)
Definition: register.c:865
static const WCHAR Message[]
Definition: register.c:74
static CRYPT_TRUST_REG_ENTRY DriverFinalPolicy
Definition: register.c:59
static BOOL WINTRUST_RegisterGenVerifyV2(void)
Definition: register.c:418
static CRYPT_TRUST_REG_ENTRY GenericChainCertificateTrust
Definition: register.c:62
static CRYPT_TRUST_REG_ENTRY SoftpubMessage
Definition: register.c:41
static CRYPT_TRUST_REG_ENTRY HTTPSCertificateTrust
Definition: register.c:52
HRESULT WINAPI mscat32DllUnregisterServer(void)
Definition: register.c:1234
static CRITICAL_SECTION cache_cs
Definition: register.c:835
static BOOL WINTRUST_RegisterPublishedSoftware(void)
Definition: register.c:457
static const WCHAR Cleanup[]
Definition: register.c:80
static CRYPT_TRUST_REG_ENTRY DriverInitializePolicy
Definition: register.c:58
static const WCHAR DiagnosticPolicy[]
Definition: register.c:79
static CRYPT_TRUST_REG_ENTRY GenericChainFinalProv
Definition: register.c:63
static CRITICAL_SECTION_DEBUG cache_cs_debug
Definition: register.c:836
static const WCHAR Signature[]
Definition: register.c:75
#define WINTRUST_REGISTEROID(oid, encode_funcname, decode_funcname)
static const WCHAR DefaultId[]
Definition: register.c:82
static const WCHAR Certificate[]
Definition: register.c:76
static FARPROC WINTRUST_ReadProviderFromReg(WCHAR *GuidString, const WCHAR *FunctionType)
Definition: register.c:794
static void WINTRUST_InitRegStructs(void)
Definition: register.c:91
#define WINTRUST_INITREGENTRY(action, dllname, functionname)
static CRYPT_TRUST_REG_ENTRY SoftpubCleanup
Definition: register.c:46
static BOOL WINTRUST_RegisterTrustProviderTest(void)
Definition: register.c:549
HRESULT WINAPI SoftpubDllRegisterServer(void)
Definition: register.c:1178
static BOOL WINTRUST_RegisterOfficeSignVerify(void)
Definition: register.c:630
static BOOL WINTRUST_RegisterGenCertVerify(void)
Definition: register.c:519
static unsigned int provider_cache_size
Definition: register.c:850
static LONG WINTRUST_WriteProviderToReg(WCHAR *GuidString, const WCHAR *FunctionType, CRYPT_TRUST_REG_ENTRY RegEntry)
Definition: register.c:177
static BOOL WINTRUST_RegisterDriverVerify(void)
Definition: register.c:661
static CRYPT_TRUST_REG_ENTRY DriverCleanupPolicy
Definition: register.c:60
HRESULT WINAPI mscat32DllRegisterServer(void)
Definition: register.c:1225
static CRYPT_TRUST_REG_ENTRY SoftpubDefCertInit
Definition: register.c:48
static void WINTRUST_RemoveProviderFromReg(WCHAR *GuidString, const WCHAR *FunctionType)
Definition: register.c:302
#define WINTRUST_FREEREGENTRY(action)
static CRYPT_TRUST_REG_ENTRY SoftpubFinalPolicy
Definition: register.c:45
static const WCHAR Trust[]
Definition: register.c:67
static CRYPT_TRUST_REG_ENTRY SoftpubCertCheck
Definition: register.c:44
static CRYPT_TRUST_REG_ENTRY SoftpubInitialization
Definition: register.c:40
HRESULT WINAPI SoftpubDllUnregisterServer(void)
Definition: register.c:1216
BOOL WINAPI WintrustAddActionID(GUID *pgActionID, DWORD fdwFlags, CRYPT_REGISTER_ACTIONID *psProvInfo)
Definition: register.c:236
static BOOL WINTRUST_RegisterGenChainVerify(void)
Definition: register.c:692
BOOL WINAPI WintrustRemoveActionID(GUID *pgActionID)
Definition: register.c:335
static BOOL WINTRUST_RegisterHttpsProv(void)
Definition: register.c:579
static CRYPT_TRUST_REG_ENTRY OfficeCleanupPolicy
Definition: register.c:56
BOOL WINAPI WintrustAddDefaultForUsage(const char *pszUsageOID, CRYPT_PROVIDER_REGDEFUSAGE *psDefUsage)
Definition: register.c:730
static CRYPT_TRUST_REG_ENTRY OfficeInitializePolicy
Definition: register.c:55
static CRYPT_TRUST_REG_ENTRY HTTPSFinalProv
Definition: register.c:53
static void WINTRUST_FreeRegStructs(void)
Definition: register.c:126
static const WCHAR Initialization[]
Definition: register.c:73
static CRYPT_TRUST_REG_ENTRY SoftpubDumpStructure
Definition: register.c:50
#define WIN_SPUB_ACTION_PUBLISHED_SOFTWARE_NOBADUI
Definition: register.c:478
static CRYPT_TRUST_REG_ENTRY SoftpubSignature
Definition: register.c:42
static BOOL WINTRUST_RegisterPublishedSoftwareNoBadUi(void)
Definition: register.c:489
HRESULT WINAPI mssip32DllRegisterServer(void)
Definition: register.c:1243
return ret
Definition: mutex.c:146
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_a
Definition: kernel32.h:31
#define REG_SZ
Definition: layer.c:22
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
static PWSTR GuidString
Definition: apphelp.c:93
UINT64 OID
Definition: marshal.c:87
HRESULT WINAPI DllRegisterServer(void)
Definition: msctf.cpp:586
HRESULT WINAPI DllUnregisterServer(void)
Definition: msctf.cpp:594
struct SIP_ADD_NEWPROVIDER_ SIP_ADD_NEWPROVIDER
#define KEY_READ
Definition: nt_native.h:1026
#define KEY_WRITE
Definition: nt_native.h:1034
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
void(* Func)(int)
#define calloc
Definition: rosglue.h:14
#define memset(x, y, z)
Definition: compat.h:39
static const WCHAR SP_INIT_FUNCTION[]
Definition: softpub.h:132
static const WCHAR GENERIC_CHAIN_CERTTRUST_FUNCTION[]
Definition: softpub.h:51
#define WINTRUST_ACTION_GENERIC_VERIFY_V2
Definition: softpub.h:108
static const WCHAR OFFICE_CLEANUPPOLICY_FUNCTION[]
Definition: softpub.h:196
static const WCHAR SP_POLICY_PROVIDER_DLL_NAME[]
Definition: softpub.h:104
static const WCHAR GENERIC_CHAIN_FINALPOLICY_FUNCTION[]
Definition: softpub.h:49
#define DRIVER_ACTION_VERIFY
Definition: softpub.h:200
static const WCHAR HTTPS_CERTTRUST_FUNCTION[]
Definition: softpub.h:171
static const WCHAR SP_FINALPOLICY_FUNCTION[]
Definition: softpub.h:140
#define HTTPSPROV_ACTION
Definition: softpub.h:159
#define WINTRUST_ACTION_TRUSTPROVIDER_TEST
Definition: softpub.h:146
static const WCHAR DRIVER_INITPROV_FUNCTION[]
Definition: softpub.h:215
static const WCHAR SP_CLEANUPPOLICY_FUNCTION[]
Definition: softpub.h:142
static const WCHAR HTTPS_FINALPOLICY_FUNCTION[]
Definition: softpub.h:173
static const WCHAR SP_GENERIC_CERT_INIT_FUNCTION[]
Definition: softpub.h:33
static const WCHAR SP_TESTDUMPPOLICY_FUNCTION_TEST[]
Definition: softpub.h:155
static const WCHAR SP_CHKCERT_FUNCTION[]
Definition: softpub.h:138
static const WCHAR OFFICE_INITPROV_FUNCTION[]
Definition: softpub.h:194
#define WINTRUST_ACTION_GENERIC_CHAIN_VERIFY
Definition: softpub.h:37
#define OFFICESIGN_ACTION_VERIFY
Definition: softpub.h:177
static const WCHAR DRIVER_CLEANUPPOLICY_FUNCTION[]
Definition: softpub.h:219
static const WCHAR SP_OBJTRUST_FUNCTION[]
Definition: softpub.h:134
static const WCHAR SP_SIGTRUST_FUNCTION[]
Definition: softpub.h:136
#define WINTRUST_ACTION_GENERIC_CERT_VERIFY
Definition: softpub.h:24
static const WCHAR OFFICE_POLICY_PROVIDER_DLL_NAME[]
Definition: softpub.h:192
static const WCHAR DRIVER_FINALPOLPROV_FUNCTION[]
Definition: softpub.h:217
#define TRACE(s)
Definition: solgame.cpp:4
Registry entry.
Definition: regfs.h:31
WCHAR * pwszPutFuncName
Definition: mssip.h:153
WCHAR * pwszCreateFuncName
Definition: mssip.h:154
GUID * pgSubject
Definition: mssip.h:145
WCHAR * pwszMagicNumber
Definition: mssip.h:148
WCHAR * pwszGetCapFuncName
Definition: mssip.h:161
WCHAR * pwszRemoveFuncName
Definition: mssip.h:156
WCHAR * pwszIsFunctionName
Definition: mssip.h:150
WCHAR * pwszGetFuncName
Definition: mssip.h:152
WCHAR * pwszIsFunctionNameFmt2
Definition: mssip.h:158
WCHAR * pwszVerifyFuncName
Definition: mssip.h:155
WCHAR * pwszDLLFileName
Definition: mssip.h:147
PFN_PROVIDER_CLEANUP_CALL pfnCleanupPolicy
Definition: wintrust.h:329
PFN_PROVIDER_CERTTRUST_CALL pfnCertificateTrust
Definition: wintrust.h:324
PFN_PROVIDER_OBJTRUST_CALL pfnObjectTrust
Definition: wintrust.h:322
PFN_PROVIDER_SIGTRUST_CALL pfnSignatureTrust
Definition: wintrust.h:323
PFN_CPD_ADD_CERT pfnAddCert2Chain
Definition: wintrust.h:319
PFN_PROVIDER_TESTFINALPOLICY_CALL pfnTestFinalPolicy
Definition: wintrust.h:327
PFN_CPD_MEM_ALLOC pfnAlloc
Definition: wintrust.h:315
PFN_CPD_ADD_PRIVDATA pfnAddPrivData2Chain
Definition: wintrust.h:320
PFN_PROVIDER_FINALPOLICY_CALL pfnFinalPolicy
Definition: wintrust.h:325
PFN_CPD_ADD_STORE pfnAddStore2Chain
Definition: wintrust.h:317
PFN_PROVIDER_INIT_CALL pfnInitialize
Definition: wintrust.h:321
PFN_PROVIDER_CERTCHKPOLICY_CALL pfnCertCheckPolicy
Definition: wintrust.h:326
PFN_CPD_MEM_FREE pfnFree
Definition: wintrust.h:316
struct _CRYPT_PROVUI_FUNCS * psUIpfns
Definition: wintrust.h:328
PFN_CPD_ADD_SGNR pfnAddSgnr2Chain
Definition: wintrust.h:318
char * pwszLoadCallbackDataFunctionName
Definition: wintrust.h:190
char * pwszFreeCallbackDataFunctionName
Definition: wintrust.h:191
CRYPT_TRUST_REG_ENTRY sCertificateProvider
Definition: wintrust.h:178
CRYPT_TRUST_REG_ENTRY sInitProvider
Definition: wintrust.h:175
CRYPT_TRUST_REG_ENTRY sTestPolicyProvider
Definition: wintrust.h:181
CRYPT_TRUST_REG_ENTRY sCertificatePolicyProvider
Definition: wintrust.h:179
CRYPT_TRUST_REG_ENTRY sFinalPolicyProvider
Definition: wintrust.h:180
CRYPT_TRUST_REG_ENTRY sCleanupProvider
Definition: wintrust.h:182
CRYPT_TRUST_REG_ENTRY sObjectProvider
Definition: wintrust.h:176
CRYPT_TRUST_REG_ENTRY sSignatureProvider
Definition: wintrust.h:177
Definition: wintrust.h:166
Definition: register.c:845
GUID guid
Definition: register.c:846
CRYPT_PROVIDER_FUNCTIONS provider_functions
Definition: register.c:847
#define DWORD_PTR
Definition: treelist.c:76
unsigned char * LPBYTE
Definition: typedefs.h:53
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define szOID_SGC_NETSCAPE
Definition: wincrypt.h:3372
#define PROV_RSA_FULL
Definition: wincrypt.h:2243
#define CRYPT_VERIFYCONTEXT
Definition: wincrypt.h:2273
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:55
#define szOID_PKIX_KP_CLIENT_AUTH
Definition: wincrypt.h:3451
#define szOID_PKIX_KP_CODE_SIGNING
Definition: wincrypt.h:3452
#define szOID_PKIX_KP_SERVER_AUTH
Definition: wincrypt.h:3450
#define szOID_SERVER_GATED_CRYPTO
Definition: wincrypt.h:3369
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define SPC_JAVA_CLASS_DATA_OBJID
Definition: wintrust.h:488
#define SPC_MINIMAL_CRITERIA_OBJID
Definition: wintrust.h:493
#define SPC_INDIRECT_DATA_CONTENT_STRUCT
Definition: wintrust.h:503
HRESULT(WINAPI * PFN_PROVIDER_OBJTRUST_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:297
#define SPC_JAVA_CLASS_DATA_STRUCT
Definition: wintrust.h:509
HRESULT(WINAPI * PFN_PROVIDER_CLEANUP_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:307
#define SPC_FINANCIAL_CRITERIA_OBJID
Definition: wintrust.h:494
#define SPC_MINIMAL_CRITERIA_STRUCT
Definition: wintrust.h:501
HRESULT(WINAPI * PFN_PROVIDER_CERTTRUST_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:301
#define SPC_PE_IMAGE_DATA_OBJID
Definition: wintrust.h:485
#define SPC_SIGINFO_OBJID
Definition: wintrust.h:496
BOOL(WINAPI * PFN_PROVIDER_CERTCHKPOLICY_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSignerChain, DWORD idxCounterSigner)
Definition: wintrust.h:309
#define CAT_NAMEVALUE_OBJID
Definition: wintrust.h:497
struct _CRYPT_PROVIDER_REGDEFUSAGE CRYPT_PROVIDER_REGDEFUSAGE
#define SPC_PE_IMAGE_DATA_STRUCT
Definition: wintrust.h:504
#define SPC_CAB_DATA_STRUCT
Definition: wintrust.h:508
HRESULT(WINAPI * PFN_PROVIDER_SIGTRUST_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:299
struct _CRYPT_REGISTER_ACTIONID CRYPT_REGISTER_ACTIONID
#define SPC_SP_OPUS_INFO_OBJID
Definition: wintrust.h:483
static const WCHAR WT_PROVIDER_CERTTRUST_FUNCTION[]
Definition: wintrust.h:457
#define CAT_MEMBERINFO_OBJID
Definition: wintrust.h:498
#define WIN_SPUB_ACTION_PUBLISHED_SOFTWARE
Definition: wintrust.h:660
#define SPC_SP_OPUS_INFO_STRUCT
Definition: wintrust.h:507
#define WT_ADD_ACTION_ID_RET_RESULT_FLAG
Definition: wintrust.h:448
#define SPC_LINK_OBJID
Definition: wintrust.h:495
#define SPC_STATEMENT_TYPE_STRUCT
Definition: wintrust.h:506
#define SPC_SP_AGENCY_INFO_OBJID
Definition: wintrust.h:481
#define SPC_SP_AGENCY_INFO_STRUCT
Definition: wintrust.h:500
#define CAT_MEMBERINFO_STRUCT
Definition: wintrust.h:512
#define SPC_STATEMENT_TYPE_OBJID
Definition: wintrust.h:482
#define SPC_SIGINFO_STRUCT
Definition: wintrust.h:510
#define SPC_LINK_STRUCT
Definition: wintrust.h:505
#define SPC_CAB_DATA_OBJID
Definition: wintrust.h:491
HRESULT(WINAPI * PFN_PROVIDER_FINALPOLICY_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:303
#define SPC_FINANCIAL_CRITERIA_STRUCT
Definition: wintrust.h:502
HRESULT(WINAPI * PFN_PROVIDER_TESTFINALPOLICY_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:305
HRESULT(WINAPI * PFN_PROVIDER_INIT_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:295
#define CAT_NAMEVALUE_STRUCT
Definition: wintrust.h:511
#define SPC_INDIRECT_DATA_OBJID
Definition: wintrust.h:480
BOOL WINAPI WINTRUST_AddStore(CRYPT_PROVIDER_DATA *data, HCERTSTORE store)
BOOL WINAPI WINTRUST_AddCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner, BOOL fCounterSigner, DWORD idxCounterSigner, PCCERT_CONTEXT pCert2Add)
BOOL WINAPI WINTRUST_AddPrivData(CRYPT_PROVIDER_DATA *data, CRYPT_PROVIDER_PRIVDATA *pPrivData2Add)
BOOL WINAPI WINTRUST_AddSgnr(CRYPT_PROVIDER_DATA *data, BOOL fCounterSigner, DWORD idxSigner, CRYPT_PROVIDER_SGNR *sgnr)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175
unsigned char BYTE
Definition: xxhash.c:193