Commit 01b083c5 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

imagehlp: Move WIN_CERTIFICATE types to wintrust.h, and rename a type, to match PSDK.

parent d82b3848
......@@ -144,7 +144,7 @@ static BOOL IMAGEHLP_GetCertificateOffset( HANDLE handle, DWORD num,
*/
BOOL WINAPI ImageAddCertificate(
HANDLE FileHandle, PWIN_CERTIFICATE Certificate, PDWORD Index)
HANDLE FileHandle, LPWIN_CERTIFICATE Certificate, PDWORD Index)
{
FIXME("(%p, %p, %p): stub\n",
FileHandle, Certificate, Index
......@@ -220,7 +220,7 @@ BOOL WINAPI ImageEnumerateCertificates(
*/
BOOL WINAPI ImageGetCertificateData(
HANDLE handle, DWORD Index,
PWIN_CERTIFICATE Certificate, PDWORD RequiredLength)
LPWIN_CERTIFICATE Certificate, PDWORD RequiredLength)
{
DWORD r, offset, ofs, size, count;
......@@ -263,7 +263,7 @@ BOOL WINAPI ImageGetCertificateData(
* ImageGetCertificateHeader (IMAGEHLP.@)
*/
BOOL WINAPI ImageGetCertificateHeader(
HANDLE handle, DWORD index, PWIN_CERTIFICATE pCert)
HANDLE handle, DWORD index, LPWIN_CERTIFICATE pCert)
{
DWORD r, offset, ofs, size, count;
const size_t cert_hdr_size = sizeof *pCert - sizeof pCert->bCertificate;
......
......@@ -71,13 +71,6 @@ typedef enum _IMAGEHLP_STATUS_REASON {
#define CERT_SECTION_TYPE_ANY 0xFF
#define WIN_CERT_REVISION_1_0 0x0100
#define WIN_CERT_REVISION_2_0 0x0200
#define WIN_CERT_TYPE_X509 0x0001 /* X.509 Certificate */
#define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002 /* PKCS SignedData */
#define WIN_CERT_TYPE_RESERVED_1 0x0003 /* Reserved */
#define SPLITSYM_REMOVE_PRIVATE 0x00000001
#define SPLITSYM_EXTRACT_ALL 0x00000002
#define SPLITSYM_SYMBOLPATH_IS_SRC 0x00000004
......@@ -179,13 +172,6 @@ typedef struct _LOADED_IMAGE
ULONG SizeOfImage;
} LOADED_IMAGE, *PLOADED_IMAGE;
typedef struct _WIN_CERTIFICATE {
DWORD dwLength;
WORD wRevision; /* WIN_CERT_REVISON_xxx */
WORD wCertificateType; /* WIN_CERT_TYPE_xxx */
BYTE bCertificate[ANYSIZE_ARRAY];
} WIN_CERTIFICATE, *PWIN_CERTIFICATE;
typedef struct _API_VERSION {
USHORT MajorVersion;
USHORT MinorVersion;
......@@ -841,7 +827,7 @@ DWORD WINAPI GetTimestampForLoadedLibrary(
HMODULE Module
);
BOOL WINAPI ImageAddCertificate(
HANDLE FileHandle, PWIN_CERTIFICATE Certificate, PDWORD Index
HANDLE FileHandle, LPWIN_CERTIFICATE Certificate, PDWORD Index
);
PVOID WINAPI ImageDirectoryEntryToData(
PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size
......@@ -852,11 +838,11 @@ BOOL WINAPI ImageEnumerateCertificates(
);
BOOL WINAPI ImageGetCertificateData(
HANDLE FileHandle, DWORD CertificateIndex,
PWIN_CERTIFICATE Certificate, PDWORD RequiredLength
LPWIN_CERTIFICATE Certificate, PDWORD RequiredLength
);
BOOL WINAPI ImageGetCertificateHeader(
HANDLE FileHandle, DWORD CertificateIndex,
PWIN_CERTIFICATE Certificateheader
LPWIN_CERTIFICATE Certificateheader
);
BOOL WINAPI ImageGetDigestStream(
HANDLE FileHandle, DWORD DigestLevel,
......
......@@ -533,6 +533,25 @@ typedef struct _CAT_MEMBERINFO
DWORD dwCertVersion;
} CAT_MEMBERINFO, *PCAT_MEMBERINFO;
/* PSDK protects the remaining defines with WT_DEFINE_ALL_APIS, but it's
* defined by default. No need to protect against bad headers from old PSDKs.
*/
typedef struct _WIN_CERTIFICATE {
DWORD dwLength;
WORD wRevision; /* WIN_CERT_REVISON_xxx */
WORD wCertificateType; /* WIN_CERT_TYPE_xxx */
BYTE bCertificate[ANYSIZE_ARRAY];
} WIN_CERTIFICATE, *LPWIN_CERTIFICATE;
#define WIN_CERT_REVISION_1_0 0x0100
#define WIN_CERT_REVISION_2_0 0x0200
#define WIN_CERT_TYPE_X509 0x0001 /* X.509 Certificate */
#define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002 /* PKCS SignedData */
#define WIN_CERT_TYPE_RESERVED_1 0x0003 /* Reserved */
#define WIN_CERT_TYPE_TS_STACK_SIGNED 0x0004
#define WIN_SPUB_ACTION_PUBLISHED_SOFTWARE \
{ 0x64b9d180, 0x8da2, 0x11cf, { 0x87,0x36,0x00,0xaa,0x00,0xa4,0x85,0xeb }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment