2 * Copyright (C) 2002 Patrik Stridvall
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.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_MSSIP_H
20 #define __WINE_MSSIP_H
24 #endif /* defined(__cplusplus) */
26 /**********************************************************************/
28 typedef CRYPT_HASH_BLOB CRYPT_DIGEST_DATA
;
30 /**********************************************************************/
32 #define MSSIP_FLAGS_PROHIBIT_RESIZE_ON_CREATE 0x00010000
33 #define MSSIP_FLAGS_USE_CATALOG 0x00020000
35 #define SPC_INC_PE_RESOURCES_FLAG 0x80
36 #define SPC_INC_PE_DEBUG_INFO_FLAG 0x40
37 #define SPC_INC_PE_IMPORT_ADDR_TABLE_FLAG 0x20
39 #define MSSIP_ADDINFO_NONE 0
40 #define MSSIP_ADDINFO_FLAT 1
41 #define MSSIP_ADDINFO_CATMEMBER 2
42 #define MSSIP_ADDINFO_BLOB 3
43 #define MSSIP_ADDINFO_NONMSSIP 500
45 #define SIP_MAX_MAGIC_NUMBER 4
47 /**********************************************************************/
50 typedef struct SIP_SUBJECTINFO_
{
55 LPCWSTR pwsDisplayName
;
61 CRYPT_ALGORITHM_IDENTIFIER DigestAlgorithm
;
65 DWORD fdwCAPISettings
;
66 DWORD fdwSecuritySettings
;
71 struct MS_ADDINFO_FLAT_
*psFlat
;
72 struct MS_ADDINFO_CATALOGMEMBER_
*psCatMember
;
73 struct MS_ADDINFO_BLOB_
*psBlob
;
77 } SIP_SUBJECTINFO
, *LPSIP_SUBJECTINFO
;
81 typedef struct MS_ADDINFO_FLAT_
{
84 struct SIP_INDIRECT_DATA_
*pIndirectData
;
85 } MS_ADDINFO_FLAT
, *PMS_ADDINFO_FLAT
;
89 typedef struct MS_ADDINFO_CATALOGMEMBER_
{
92 struct CRYPTCATSTORE_
*pStore
;
93 struct CRYPTCATMEMBER_
*pMember
;
94 } MS_ADDINFO_CATALOGMEMBER
, *PMS_ADDINFO_CATALOGMEMBER
;
98 typedef struct MS_ADDINFO_BLOB_
{
104 DWORD cbMemSignedMsg
;
105 BYTE
*pbMemSignedMsg
;
106 } MS_ADDINFO_BLOB
, *PMS_ADDINFO_BLOB
;
109 #include <pshpack8.h>
110 typedef struct SIP_INDIRECT_DATA_
{
111 CRYPT_ATTRIBUTE_TYPE_VALUE Data
;
112 CRYPT_ALGORITHM_IDENTIFIER DigestAlgorithm
;
113 CRYPT_HASH_BLOB Digest
;
114 } SIP_INDIRECT_DATA
, *PSIP_INDIRECT_DATA
;
117 typedef BOOL (WINAPI
* pCryptSIPGetSignedDataMsg
)(SIP_SUBJECTINFO
*,DWORD
*,DWORD
,DWORD
*,BYTE
*);
118 typedef BOOL (WINAPI
* pCryptSIPPutSignedDataMsg
)(SIP_SUBJECTINFO
*,DWORD
,DWORD
*,DWORD
,BYTE
*);
119 typedef BOOL (WINAPI
* pCryptSIPCreateIndirectData
)(SIP_SUBJECTINFO
*,DWORD
*,SIP_INDIRECT_DATA
*);
120 typedef BOOL (WINAPI
* pCryptSIPVerifyIndirectData
)(SIP_SUBJECTINFO
*,SIP_INDIRECT_DATA
*);
121 typedef BOOL (WINAPI
* pCryptSIPRemoveSignedDataMsg
)(SIP_SUBJECTINFO
*,DWORD
);
123 #include <pshpack8.h>
124 typedef struct SIP_DISPATCH_INFO_
{
129 pCryptSIPGetSignedDataMsg pfGet
;
130 pCryptSIPPutSignedDataMsg pfPut
;
131 pCryptSIPCreateIndirectData pfCreate
;
132 pCryptSIPVerifyIndirectData pfVerify
;
133 pCryptSIPRemoveSignedDataMsg pfRemove
;
134 } SIP_DISPATCH_INFO
, *LPSIP_DISPATCH_INFO
;
137 typedef BOOL (WINAPI
*pfnIsFileSupported
)(HANDLE
,GUID
*);
138 typedef BOOL (WINAPI
*pfnIsFileSupportedName
)(WCHAR
*,GUID
*);
140 #include <pshpack8.h>
141 typedef struct SIP_ADD_NEWPROVIDER_
147 WCHAR
*pwszDLLFileName
;
148 WCHAR
*pwszMagicNumber
;
150 WCHAR
*pwszIsFunctionName
;
152 WCHAR
*pwszGetFuncName
;
153 WCHAR
*pwszPutFuncName
;
154 WCHAR
*pwszCreateFuncName
;
155 WCHAR
*pwszVerifyFuncName
;
156 WCHAR
*pwszRemoveFuncName
;
158 WCHAR
*pwszIsFunctionNameFmt2
;
160 WCHAR
*pwszGetCapFuncName
;
161 } SIP_ADD_NEWPROVIDER
, *PSIP_ADD_NEWPROVIDER
;
164 /**********************************************************************/
166 BOOL WINAPI
CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO
*,DWORD
*,DWORD
,DWORD
*,BYTE
*);
167 BOOL WINAPI
CryptSIPPutSignedDataMsg(SIP_SUBJECTINFO
*,DWORD
,DWORD
*,DWORD
,BYTE
*);
168 BOOL WINAPI
CryptSIPCreateIndirectData(SIP_SUBJECTINFO
*,DWORD
*,SIP_INDIRECT_DATA
*);
169 BOOL WINAPI
CryptSIPVerifyIndirectData(SIP_SUBJECTINFO
*,SIP_INDIRECT_DATA
*);
170 BOOL WINAPI
CryptSIPRemoveSignedDataMsg(SIP_SUBJECTINFO
*,DWORD
);
172 BOOL WINAPI
CryptSIPLoad(const GUID
*,DWORD
,SIP_DISPATCH_INFO
*);
173 BOOL WINAPI
CryptSIPRetrieveSubjectGuid(LPCWSTR
,HANDLE
,GUID
*);
174 BOOL WINAPI
CryptSIPRetrieveSubjectGuidForCatalogFile(LPCWSTR
,HANDLE
,GUID
*);
175 BOOL WINAPI
CryptSIPAddProvider(SIP_ADD_NEWPROVIDER
*);
176 BOOL WINAPI
CryptSIPRemoveProvider(GUID
*);
180 #endif /* defined(__cplusplus) */
182 #endif /* __WINE_MSSIP_H */