2004-10-21 23:00:29 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2004 Francois Gouget
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2004-10-21 23:00:29 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_MSCAT_H
|
|
|
|
#define __WINE_MSCAT_H
|
|
|
|
|
2007-01-26 13:18:56 +01:00
|
|
|
#include <mssip.h>
|
|
|
|
|
2004-10-21 23:00:29 +02:00
|
|
|
typedef HANDLE HCATADMIN;
|
2006-08-20 14:17:34 +02:00
|
|
|
typedef HANDLE HCATINFO;
|
2004-10-21 23:00:29 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-10-18 19:58:13 +02:00
|
|
|
#define CRYPTCAT_ATTR_NAMEASCII 0x00000001
|
|
|
|
#define CRYPTCAT_ATTR_NAMEOBJID 0x00000002
|
|
|
|
#define CRYPTCAT_ATTR_DATAASCII 0x00010000
|
|
|
|
#define CRYPTCAT_ATTR_DATAOBJID 0x00020000
|
|
|
|
#define CRYPTCAT_ATTR_DATAREPLACE 0x00040000
|
|
|
|
#define CRYPTCAT_ATTR_NO_AUTO_COMPAT_ENTRY 0x01000000
|
|
|
|
#define CRYPTCAT_ATTR_AUTHENTICATED 0x10000000
|
|
|
|
#define CRYPTCAT_ATTR_UNAUTHENTICATED 0x20000000
|
|
|
|
|
2008-12-22 14:19:00 +01:00
|
|
|
#define CRYPTCAT_OPEN_CREATENEW 0x00000001
|
|
|
|
#define CRYPTCAT_OPEN_ALWAYS 0x00000002
|
|
|
|
#define CRYPTCAT_OPEN_EXISTING 0x00000004
|
|
|
|
#define CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES 0x00010000
|
|
|
|
#define CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES 0x00020000
|
|
|
|
#define CRYPTCAT_OPEN_VERIFYSIGHASH 0x10000000
|
|
|
|
#define CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG 0x20000000
|
|
|
|
#define CRYPTCAT_OPEN_SORTED 0x40000000
|
|
|
|
#define CRYPTCAT_OPEN_FLAGS_MASK 0xffff0000
|
2007-01-26 13:19:12 +01:00
|
|
|
|
2009-01-20 13:13:03 +01:00
|
|
|
#define CRYPTCAT_E_AREA_HEADER 0x00000000
|
|
|
|
#define CRYPTCAT_E_AREA_MEMBER 0x00010000
|
|
|
|
#define CRYPTCAT_E_AREA_ATTRIBUTE 0x00020000
|
|
|
|
|
|
|
|
#define CRYPTCAT_E_CDF_UNSUPPORTED 0x00000001
|
|
|
|
#define CRYPTCAT_E_CDF_DUPLICATE 0x00000002
|
|
|
|
#define CRYPTCAT_E_CDF_TAGNOTFOUND 0x00000004
|
|
|
|
|
|
|
|
#define CRYPTCAT_E_CDF_MEMBER_FILE_PATH 0x00010001
|
|
|
|
#define CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA 0x00010002
|
|
|
|
#define CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND 0x00010004
|
|
|
|
|
|
|
|
#define CRYPTCAT_E_CDF_BAD_GUID_CONV 0x00020001
|
|
|
|
#define CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES 0x00020002
|
|
|
|
#define CRYPTCAT_E_CDF_ATTR_TYPECOMBO 0x00020004
|
|
|
|
|
2020-09-09 02:30:16 +02:00
|
|
|
#define CRYPTCAT_VERSION_1 0x100
|
|
|
|
#define CRYPTCAT_VERSION_2 0x200
|
|
|
|
|
2007-01-26 13:19:12 +01:00
|
|
|
#include <pshpack8.h>
|
|
|
|
|
2008-12-22 14:19:00 +01:00
|
|
|
typedef struct CRYPTCATATTRIBUTE_
|
|
|
|
{
|
|
|
|
DWORD cbStruct;
|
|
|
|
LPWSTR pwszReferenceTag;
|
|
|
|
DWORD dwAttrTypeAndAction;
|
|
|
|
DWORD cbValue;
|
|
|
|
BYTE *pbValue;
|
|
|
|
DWORD dwReserved;
|
|
|
|
} CRYPTCATATTRIBUTE;
|
|
|
|
|
|
|
|
typedef struct CRYPTCATMEMBER_
|
|
|
|
{
|
2006-09-14 02:15:00 +02:00
|
|
|
DWORD cbStruct;
|
|
|
|
LPWSTR pwszReferenceTag;
|
|
|
|
LPWSTR pwszFileName;
|
|
|
|
GUID gSubjectType;
|
|
|
|
DWORD fdwMemberFlags;
|
|
|
|
struct SIP_INDIRECT_DATA_* pIndirectData;
|
|
|
|
DWORD dwCertVersion;
|
|
|
|
DWORD dwReserved;
|
|
|
|
HANDLE hReserved;
|
|
|
|
CRYPT_ATTR_BLOB sEncodedIndirectData;
|
|
|
|
CRYPT_ATTR_BLOB sEncodedMemberInfo;
|
|
|
|
} CRYPTCATMEMBER;
|
|
|
|
|
2008-12-22 14:19:00 +01:00
|
|
|
typedef struct CATALOG_INFO_
|
|
|
|
{
|
|
|
|
DWORD cbStruct;
|
|
|
|
WCHAR wszCatalogFile[MAX_PATH];
|
|
|
|
} CATALOG_INFO;
|
|
|
|
|
2009-01-17 16:02:36 +01:00
|
|
|
typedef struct CRYPTCATCDF_
|
|
|
|
{
|
|
|
|
DWORD cbStruct;
|
|
|
|
HANDLE hFile;
|
|
|
|
DWORD dwCurFilePos;
|
|
|
|
DWORD dwLastMemberOffset;
|
|
|
|
BOOL fEOF;
|
|
|
|
LPWSTR pwszResultDir;
|
|
|
|
HANDLE hCATStore;
|
|
|
|
} CRYPTCATCDF;
|
|
|
|
|
2007-01-26 13:19:12 +01:00
|
|
|
#include <poppack.h>
|
|
|
|
|
2009-01-17 16:02:36 +01:00
|
|
|
typedef void (WINAPI *PFN_CDF_PARSE_ERROR_CALLBACK)(DWORD, DWORD, WCHAR *);
|
2007-01-26 13:19:12 +01:00
|
|
|
|
2004-10-21 23:00:29 +02:00
|
|
|
BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN*,const GUID*,DWORD);
|
2018-08-06 16:29:29 +02:00
|
|
|
BOOL WINAPI CryptCATAdminAcquireContext2(HCATADMIN*,const GUID*,const WCHAR*,const CERT_STRONG_SIGN_PARA*,DWORD);
|
2008-10-14 19:56:17 +02:00
|
|
|
HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN,PWSTR,PWSTR,DWORD);
|
2005-07-18 11:09:41 +02:00
|
|
|
BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE,DWORD*,BYTE*,DWORD);
|
2018-08-06 16:29:29 +02:00
|
|
|
BOOL WINAPI CryptCATAdminCalcHashFromFileHandle2(HCATADMIN,HANDLE,DWORD*,BYTE*,DWORD);
|
2006-08-20 14:17:34 +02:00
|
|
|
HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN,BYTE*,DWORD,DWORD,HCATINFO*);
|
2007-08-08 10:49:27 +02:00
|
|
|
BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN,HCATINFO,DWORD);
|
2005-07-18 11:09:41 +02:00
|
|
|
BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN,DWORD);
|
2007-08-08 10:49:27 +02:00
|
|
|
BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN,LPCWSTR,DWORD);
|
2008-12-22 14:19:00 +01:00
|
|
|
BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN, WCHAR *, CATALOG_INFO *, DWORD);
|
|
|
|
BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO, CATALOG_INFO *, DWORD);
|
2009-01-17 16:02:36 +01:00
|
|
|
BOOL WINAPI CryptCATCDFClose(CRYPTCATCDF *);
|
|
|
|
CRYPTCATATTRIBUTE * WINAPI CryptCATCDFEnumCatAttributes(CRYPTCATCDF *, CRYPTCATATTRIBUTE *,
|
|
|
|
PFN_CDF_PARSE_ERROR_CALLBACK);
|
|
|
|
LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF *, LPWSTR,
|
|
|
|
PFN_CDF_PARSE_ERROR_CALLBACK,
|
|
|
|
CRYPTCATMEMBER **, BOOL, LPVOID);
|
|
|
|
CRYPTCATCDF * WINAPI CryptCATCDFOpen(LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK);
|
|
|
|
BOOL WINAPI CryptCATClose(HANDLE);
|
2008-12-22 14:19:00 +01:00
|
|
|
CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateAttr(HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *);
|
|
|
|
CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateCatAttr(HANDLE, CRYPTCATATTRIBUTE *);
|
|
|
|
CRYPTCATMEMBER * WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER *);
|
|
|
|
CRYPTCATATTRIBUTE * WINAPI CryptCATGetAttrInfo(HANDLE, CRYPTCATMEMBER *, LPWSTR);
|
|
|
|
CRYPTCATATTRIBUTE * WINAPI CryptCATGetCatAttrInfo(HANDLE, LPWSTR);
|
|
|
|
CRYPTCATMEMBER * WINAPI CryptCATGetMemberInfo(HANDLE, LPWSTR);
|
2007-01-26 13:18:56 +01:00
|
|
|
HANDLE WINAPI CryptCATOpen(LPWSTR,DWORD,HCRYPTPROV,DWORD,DWORD);
|
2020-10-18 19:58:12 +02:00
|
|
|
BOOL WINAPI CryptCATPersistStore(HANDLE catalog);
|
2020-10-18 19:58:13 +02:00
|
|
|
CRYPTCATATTRIBUTE * WINAPI CryptCATPutAttrInfo(HANDLE catalog, CRYPTCATMEMBER *member, WCHAR *name, DWORD flags, DWORD size, BYTE *data);
|
2020-10-18 19:58:14 +02:00
|
|
|
CRYPTCATATTRIBUTE * WINAPI CryptCATPutCatAttrInfo(HANDLE catalog, WCHAR *name, DWORD flags, DWORD size, BYTE *data);
|
2020-10-18 19:58:11 +02:00
|
|
|
CRYPTCATMEMBER * WINAPI CryptCATPutMemberInfo(HANDLE catalog, WCHAR *filename, WCHAR *member, GUID *subject, DWORD version, DWORD size, BYTE *data);
|
2004-10-21 23:00:29 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|