wintrust.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Copyright (C) 2004 Francois Gouget
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef __WINE_WINTRUST_H
  19. #define __WINE_WINTRUST_H
  20. #include <wincrypt.h>
  21. #include <pshpack8.h>
  22. typedef struct WINTRUST_FILE_INFO_
  23. {
  24. DWORD cbStruct;
  25. LPCWSTR pcwszFilePath;
  26. HANDLE hFile;
  27. GUID* pgKnownSubject;
  28. } WINTRUST_FILE_INFO, *PWINTRUST_FILE_INFO;
  29. typedef struct WINTRUST_CATALOG_INFO_
  30. {
  31. DWORD cbStruct;
  32. DWORD dwCatalogVersion;
  33. LPCWSTR pcwszCatalogFilePath;
  34. LPCWSTR pcwszMemberTag;
  35. LPCWSTR pcwszMemberFilePath;
  36. HANDLE hMemberFile;
  37. BYTE* pbCalculatedFileHash;
  38. DWORD cbCalculatedFileHash;
  39. PCCTL_CONTEXT pcCatalogContext;
  40. } WINTRUST_CATALOG_INFO, *PWINTRUST_CATALOG_INFO;
  41. typedef struct WINTRUST_BLOB_INFO_
  42. {
  43. DWORD cbStruct;
  44. GUID gSubject;
  45. LPCWSTR pcwszDisplayName;
  46. DWORD cbMemObject;
  47. BYTE* pbMemObject;
  48. DWORD cbMemSignedMsg;
  49. BYTE* pbMemSignedMsg;
  50. } WINTRUST_BLOB_INFO, *PWINTRUST_BLOB_INFO;
  51. typedef struct WINTRUST_SGNR_INFO_
  52. {
  53. DWORD cbStruct;
  54. LPCWSTR pcwszDisplayName;
  55. CMSG_SIGNER_INFO* psSignerInfo;
  56. DWORD chStores;
  57. HCERTSTORE* pahStores;
  58. } WINTRUST_SGNR_INFO, *PWINTRUST_SGNR_INFO;
  59. typedef struct WINTRUST_CERT_INFO_
  60. {
  61. DWORD cbStruct;
  62. LPCWSTR pcwszDisplayName;
  63. CERT_CONTEXT* psCertContext;
  64. DWORD chStores;
  65. HCERTSTORE* pahStores;
  66. DWORD dwFlags;
  67. FILETIME* psftVerifyAsOf;
  68. } WINTRUST_CERT_INFO, *PWINTRUST_CERT_INFO;
  69. typedef struct _WINTRUST_DATA
  70. {
  71. DWORD cbStruct;
  72. LPVOID pPolicyCallbackData;
  73. LPVOID pSIPClientData;
  74. DWORD dwUIChoice;
  75. DWORD fdwRevocationChecks;
  76. DWORD dwUnionChoice;
  77. union
  78. {
  79. struct WINTRUST_FILE_INFO_* pFile;
  80. struct WINTRUST_CATALOG_INFO_* pCatalog;
  81. struct WINTRUST_BLOB_INFO_* pBlob;
  82. struct WINTRUST_SGNR_INFO_* pSgnr;
  83. struct WINTRUST_CERT_INFO_* pCert;
  84. } DUMMYUNIONNAME;
  85. DWORD dwStateAction;
  86. HANDLE hWVTStateData;
  87. WCHAR* pwszURLReference;
  88. DWORD dwProvFlags;
  89. } WINTRUST_DATA, *PWINTRUST_DATA;
  90. #include <poppack.h>
  91. #ifdef __cplusplus
  92. extern "C" {
  93. #endif
  94. LONG WINAPI WinVerifyTrust(HWND,GUID*,WINTRUST_DATA*);
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif