ReactOS  0.4.14-dev-49-gfb4591c
wintrust.h File Reference
#include <wincrypt.h>
#include <pshpack8.h>
#include <poppack.h>
Include dependency graph for wintrust.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  WINTRUST_FILE_INFO_
 
struct  WINTRUST_CATALOG_INFO_
 
struct  WINTRUST_BLOB_INFO_
 
struct  WINTRUST_SGNR_INFO_
 
struct  WINTRUST_CERT_INFO_
 
struct  _WINTRUST_DATA
 
struct  WINTRUST_SIGNATURE_SETTINGS_
 
struct  _CRYPT_TRUST_REG_ENTRY
 
struct  _CRYPT_REGISTER_ACTIONID
 
struct  _CRYPT_PROVIDER_REGDEFUSAGE
 
struct  _CRYPT_PROVUI_DATA
 
struct  _CRYPT_PROVIDER_CERT
 
struct  _CRYPT_PROVIDER_SGNR
 
struct  _CRYPT_PROVIDER_PRIVDATA
 
struct  _CRYPT_PROVIDER_FUNCTIONS
 
struct  _PROVDATA_SIP
 
struct  _CRYPT_PROVIDER_DATA
 
struct  _CRYPT_PROVIDER_SIGSTATE
 
struct  _CRYPT_PROVUI_FUNCS
 
struct  _SPC_SERIALIZED_OBJECT
 
struct  SPC_SIGINFO_
 
struct  SPC_LINK_
 
struct  _SPC_PE_IMAGE_DATA
 
struct  _SPC_INDIRECT_DATA_CONTENT
 
struct  _SPC_FINANCIAL_CRITERIA
 
struct  _SPC_IMAGE
 
struct  _SPC_SP_AGENCY_INFO
 
struct  _SPC_STATEMENT_TYPE
 
struct  _SPC_SP_OPUS_INFO
 
struct  _CAT_NAMEVALUE
 
struct  _CAT_MEMBERINFO
 
struct  _WIN_CERTIFICATE
 
struct  _WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT
 
struct  _WIN_TRUST_ACTDATA_CONTEXT_SUBJECT_ONLY
 
struct  _WIN_TRUST_SUBJECT_FILE
 
struct  _WIN_TRUST_SUBJECT_FILE_AND_DISPLAY
 

Macros

#define WTCI_DONT_OPEN_STORES   0x00000001
 
#define WTCI_OPEN_ONLY_ROOT   0x00000002
 
#define WTD_UI_ALL   1
 
#define WTD_UI_NONE   2
 
#define WTD_UI_NOBAD   3
 
#define WTD_UI_NOGOOD   4
 
#define WTD_REVOKE_NONE   0
 
#define WTD_REVOKE_WHOLECHAIN   1
 
#define WTD_CHOICE_FILE   1
 
#define WTD_CHOICE_CATALOG   2
 
#define WTD_CHOICE_BLOB   3
 
#define WTD_CHOICE_SIGNER   4
 
#define WTD_CHOICE_CERT   5
 
#define WTD_STATEACTION_IGNORE   0
 
#define WTD_STATEACTION_VERIFY   1
 
#define WTD_STATEACTION_CLOSE   2
 
#define WTD_STATEACTION_AUTO_CACHE   3
 
#define WTD_STATEACTION_AUTO_CACHE_FLUSH   4
 
#define WTD_PROV_FLAGS_MASK   0x0000ffff
 
#define WTD_USE_IE4_TRUST_FLAG   0x00000001
 
#define WTD_NO_IE4_CHAIN_FLAG   0x00000002
 
#define WTD_NO_POLICY_USAGE_FLAG   0x00000004
 
#define WTD_REVOCATION_CHECK_NONE   0x00000010
 
#define WTD_REVOCATION_CHECK_END_CERT   0x00000020
 
#define WTD_REVOCATION_CHECK_CHAIN   0x00000040
 
#define WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT   0x00000080
 
#define WTD_SAFER_FLAG   0x00000100
 
#define WTD_HASH_ONLY_FLAG   0x00000200
 
#define WTD_USE_DEFAULT_OSVER_CHECK   0x00000400
 
#define WTD_LIFETIME_SIGNING_FLAG   0x00000800
 
#define WTD_CACHE_ONLY_URL_RETRIEVAL   0x00001000
 
#define WTD_UICONTEXT_EXECUTE   0
 
#define WTD_UICONTEXT_INSTALL   1
 
#define WSS_VERIFY_SPECIFIC   0x00000001
 
#define WSS_GET_SECONDARY_SIG_COUNT   0x00000002
 
#define WSS_VERIFY_SEALING   0x00000004
 
#define WSS_INPUT_FLAG_MASK   0x00000007
 
#define WSS_OUT_SEALING_STATUS_VERIFIED   0x80000000
 
#define WSS_OUT_HAS_SEALING_INTENT   0x40000000
 
#define WSS_OUT_FILE_SUPPORTS_SEAL   0x20000000
 
#define WSS_OUTPUT_FLAG_MASK   0xe0000000
 
#define CERT_CONFIDENCE_SIG   0x10000000
 
#define CERT_CONFIDENCE_TIME   0x01000000
 
#define CERT_CONFIDENCE_TIMENEST   0x00100000
 
#define CERT_CONFIDENCE_AUTHIDEXT   0x00010000
 
#define CERT_CONFIDENCE_HYGIENE   0x00001000
 
#define CERT_CONFIDENCE_HIGHEST   0x11111000
 
#define SGNR_TYPE_TIMESTAMP   0x00000010
 
#define TRUSTERROR_STEP_WVTPARAMS   0
 
#define TRUSTERROR_STEP_FILEIO   2
 
#define TRUSTERROR_STEP_SIP   3
 
#define TRUSTERROR_STEP_SIPSUBJINFO   5
 
#define TRUSTERROR_STEP_CATALOGFILE   6
 
#define TRUSTERROR_STEP_CERTSTORE   7
 
#define TRUSTERROR_STEP_MESSAGE   8
 
#define TRUSTERROR_STEP_MSG_SIGNERCOUNT   9
 
#define TRUSTERROR_STEP_MSG_INNERCNTTYPE   10
 
#define TRUSTERROR_STEP_MSG_INNERCNT   11
 
#define TRUSTERROR_STEP_MSG_STORE   12
 
#define TRUSTERROR_STEP_MSG_SIGNERINFO   13
 
#define TRUSTERROR_STEP_MSG_SIGNERCERT   14
 
#define TRUSTERROR_STEP_MSG_CERTCHAIN   15
 
#define TRUSTERROR_STEP_MSG_COUNTERSIGINFO   16
 
#define TRUSTERROR_STEP_MSG_COUNTERSIGCERT   17
 
#define TRUSTERROR_STEP_VERIFY_MSGHASH   18
 
#define TRUSTERROR_STEP_VERIFY_MSGINDIRECTDATA   19
 
#define TRUSTERROR_STEP_FINAL_WVTINIT   30
 
#define TRUSTERROR_STEP_FINAL_INITPROV   31
 
#define TRUSTERROR_STEP_FINAL_OBJPROV   32
 
#define TRUSTERROR_STEP_FINAL_SIGPROV   33
 
#define TRUSTERROR_STEP_FINAL_CERTPROV   34
 
#define TRUSTERROR_STEP_FINAL_CERTCHKPROV   35
 
#define TRUSTERROR_STEP_FINAL_POLICYPROV   36
 
#define TRUSTERROR_STEP_FINAL_UIPROV   37
 
#define TRUSTERROR_MAX_STEPS   38
 
#define CPD_CHOICE_SIP   1
 
#define CPD_USE_NT5_CHAIN_FLAG   0x80000000
 
#define CPD_REVOCATION_CHECK_NONE   0x00010000
 
#define CPD_REVOCATION_CHECK_END_CERT   0x00020000
 
#define CPD_REVOCATION_CHECK_CHAIN   0x00040000
 
#define CPD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT   0x00080000
 
#define CPD_UISTATE_MODE_PROMPT   0x00000000
 
#define CPD_UISTATE_MODE_BLOCK   0x00000001
 
#define CPD_UISTATE_MODE_ALLOW   0x00000002
 
#define CPD_UISTATE_MODE_MASK   0x00000003
 
#define WSS_OBJTRUST_SUPPORT   0x00000001
 
#define WSS_SIGTRUST_SUPPORT   0x00000002
 
#define WSS_CERTTRUST_SUPPORT   0x00000004
 
#define WVT_OFFSETOF(t, f)   ((ULONG)((ULONG_PTR)(&((t*)0)->f)))
 
#define WVT_ISINSTRUCT(t, s, f)   (WVT_OFFSETOF(t,f) + sizeof(((t*)0)->f) <= (s))
 
#define WVT_IS_CBSTRUCT_GT_MEMBEROFFSET(t, s, f)   WVT_ISINSTRUCT(t,s,f)
 
#define WTPF_TRUSTTEST   0x00000020
 
#define WTPF_TESTCANBEVALID   0x00000080
 
#define WTPF_IGNOREEXPIRATION   0x00000100
 
#define WTPF_IGNOREREVOKATION   0x00000200
 
#define WTPF_OFFLINEOK_IND   0x00000400
 
#define WTPF_OFFLINEOK_COM   0x00000800
 
#define WTPF_OFFLINEOKNBU_IND   0x00001000
 
#define WTPF_OFFLINEOKNBU_COM   0x00002000
 
#define WTPF_VERIFY_V1_OFF   0x00010000
 
#define WTPF_IGNOREREVOCATIONONTS   0x00020000
 
#define WTPF_ALLOWONLYPERTRUST   0x00040000
 
#define WT_ADD_ACTION_ID_RET_RESULT_FLAG   1
 
#define SPC_INDIRECT_DATA_OBJID   "1.3.6.1.4.1.311.2.1.4"
 
#define SPC_SP_AGENCY_INFO_OBJID   "1.3.6.1.4.1.311.2.1.10"
 
#define SPC_STATEMENT_TYPE_OBJID   "1.3.6.1.4.1.311.2.1.11"
 
#define SPC_SP_OPUS_INFO_OBJID   "1.3.6.1.4.1.311.2.1.12"
 
#define SPC_CERT_EXTENSIONS_OBJID   "1.3.6.1.4.1.311.2.1.14"
 
#define SPC_PE_IMAGE_DATA_OBJID   "1.3.6.1.4.1.311.2.1.15"
 
#define SPC_RAW_FILE_DATA_OBJID   "1.3.6.1.4.1.311.2.1.18"
 
#define SPC_STRUCTURED_STORAGE_DATA_OBJID   "1.3.6.1.4.1.311.2.1.19"
 
#define SPC_JAVA_CLASS_DATA_OBJID   "1.3.6.1.4.1.311.2.1.20"
 
#define SPC_INDIVIDUAL_SP_KEY_PURPOSE_OBJID   "1.3.6.1.4.1.311.2.1.21"
 
#define SPC_COMMERCIAL_SP_KEY_PURPOSE_OBJID   "1.3.6.1.4.1.311.2.1.22"
 
#define SPC_CAB_DATA_OBJID   "1.3.6.1.4.1.311.2.1.25"
 
#define SPC_GLUE_RDN_OBJID   "1.3.6.1.4.1.311.2.1.25"
 
#define SPC_MINIMAL_CRITERIA_OBJID   "1.3.6.1.4.1.311.2.1.26"
 
#define SPC_FINANCIAL_CRITERIA_OBJID   "1.3.6.1.4.1.311.2.1.27"
 
#define SPC_LINK_OBJID   "1.3.6.1.4.1.311.2.1.28"
 
#define SPC_SIGINFO_OBJID   "1.3.6.1.4.1.311.2.1.30"
 
#define CAT_NAMEVALUE_OBJID   "1.3.6.1.4.1.311.12.2.1"
 
#define CAT_MEMBERINFO_OBJID   "1.3.6.1.4.1.311.12.2.2"
 
#define SPC_SP_AGENCY_INFO_STRUCT   ((LPCSTR) 2000)
 
#define SPC_MINIMAL_CRITERIA_STRUCT   ((LPCSTR) 2001)
 
#define SPC_FINANCIAL_CRITERIA_STRUCT   ((LPCSTR) 2002)
 
#define SPC_INDIRECT_DATA_CONTENT_STRUCT   ((LPCSTR) 2003)
 
#define SPC_PE_IMAGE_DATA_STRUCT   ((LPCSTR) 2004)
 
#define SPC_LINK_STRUCT   ((LPCSTR) 2005)
 
#define SPC_STATEMENT_TYPE_STRUCT   ((LPCSTR) 2006)
 
#define SPC_SP_OPUS_INFO_STRUCT   ((LPCSTR) 2007)
 
#define SPC_CAB_DATA_STRUCT   ((LPCSTR) 2008)
 
#define SPC_JAVA_CLASS_DATA_STRUCT   ((LPCSTR) 2009)
 
#define SPC_SIGINFO_STRUCT   ((LPCSTR) 2130)
 
#define CAT_NAMEVALUE_STRUCT   ((LPCSTR) 2221)
 
#define CAT_MEMBERINFO_STRUCT   ((LPCSTR) 2222)
 
#define SPC_UUID_LENGTH   16
 
#define SPC_URL_LINK_CHOICE   1
 
#define SPC_MONIKER_LINK_CHOICE   2
 
#define SPC_FILE_LINK_CHOICE   3
 
#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 }}
 

Typedefs

typedef struct WINTRUST_FILE_INFO_ WINTRUST_FILE_INFO
 
typedef struct WINTRUST_FILE_INFO_PWINTRUST_FILE_INFO
 
typedef struct WINTRUST_CATALOG_INFO_ WINTRUST_CATALOG_INFO
 
typedef struct WINTRUST_CATALOG_INFO_PWINTRUST_CATALOG_INFO
 
typedef struct WINTRUST_BLOB_INFO_ WINTRUST_BLOB_INFO
 
typedef struct WINTRUST_BLOB_INFO_PWINTRUST_BLOB_INFO
 
typedef struct WINTRUST_SGNR_INFO_ WINTRUST_SGNR_INFO
 
typedef struct WINTRUST_SGNR_INFO_PWINTRUST_SGNR_INFO
 
typedef struct WINTRUST_CERT_INFO_ WINTRUST_CERT_INFO
 
typedef struct WINTRUST_CERT_INFO_PWINTRUST_CERT_INFO
 
typedef struct _WINTRUST_DATA WINTRUST_DATA
 
typedef struct _WINTRUST_DATAPWINTRUST_DATA
 
typedef struct WINTRUST_SIGNATURE_SETTINGS_ WINTRUST_SIGNATURE_SETTINGS
 
typedef struct WINTRUST_SIGNATURE_SETTINGS_PWINTRUST_SIGNATURE_SETTINGS
 
typedef struct _CRYPT_TRUST_REG_ENTRY CRYPT_TRUST_REG_ENTRY
 
typedef struct _CRYPT_TRUST_REG_ENTRYPCRYPT_TRUST_REG_ENTRY
 
typedef struct _CRYPT_REGISTER_ACTIONID CRYPT_REGISTER_ACTIONID
 
typedef struct _CRYPT_REGISTER_ACTIONIDPCRYPT_REGISTER_ACTIONID
 
typedef struct _CRYPT_PROVIDER_REGDEFUSAGE CRYPT_PROVIDER_REGDEFUSAGE
 
typedef struct _CRYPT_PROVIDER_REGDEFUSAGEPCRYPT_PROVIDER_REGDEFUSAGE
 
typedef struct _CRYPT_PROVUI_DATA CRYPT_PROVUI_DATA
 
typedef struct _CRYPT_PROVUI_DATAPCRYPT_PROVUI_DATA
 
typedef struct _CRYPT_PROVIDER_CERT CRYPT_PROVIDER_CERT
 
typedef struct _CRYPT_PROVIDER_CERTPCRYPT_PROVIDER_CERT
 
typedef struct _CRYPT_PROVIDER_SGNR CRYPT_PROVIDER_SGNR
 
typedef struct _CRYPT_PROVIDER_SGNRPCRYPT_PROVIDER_SGNR
 
typedef struct _CRYPT_PROVIDER_PRIVDATA CRYPT_PROVIDER_PRIVDATA
 
typedef struct _CRYPT_PROVIDER_PRIVDATAPCRYPT_PROVIDER_PRIVDATA
 
typedef void__WINE_ALLOC_SIZE(1) WINAPI *PFN_CPD_MEM_ALLOC) (DWORD cbSize)
 
typedef void(WINAPIPFN_CPD_MEM_FREE) (void *pvMem2Free)
 
typedef BOOL(WINAPIPFN_CPD_ADD_STORE) (struct _CRYPT_PROVIDER_DATA *pProvData, HCERTSTORE hStore2Add)
 
typedef BOOL(WINAPIPFN_CPD_ADD_SGNR) (struct _CRYPT_PROVIDER_DATA *pProvData, BOOL fCounterSigner, DWORD idxSigner, struct _CRYPT_PROVIDER_SGNR *pSgnr2Add)
 
typedef BOOL(WINAPIPFN_CPD_ADD_CERT) (struct _CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSigner, DWORD idxCounterSigner, PCCERT_CONTEXT pCert2Add)
 
typedef BOOL(WINAPIPFN_CPD_ADD_PRIVDATA) (struct _CRYPT_PROVIDER_DATA *pProvData, struct _CRYPT_PROVIDER_PRIVDATA *pPrivData2Add)
 
typedef HRESULT(WINAPIPFN_PROVIDER_INIT_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)
 
typedef HRESULT(WINAPIPFN_PROVIDER_OBJTRUST_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)
 
typedef HRESULT(WINAPIPFN_PROVIDER_SIGTRUST_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)
 
typedef HRESULT(WINAPIPFN_PROVIDER_CERTTRUST_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)
 
typedef HRESULT(WINAPIPFN_PROVIDER_FINALPOLICY_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)
 
typedef HRESULT(WINAPIPFN_PROVIDER_TESTFINALPOLICY_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)
 
typedef HRESULT(WINAPIPFN_PROVIDER_CLEANUP_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)
 
typedef BOOL(WINAPIPFN_PROVIDER_CERTCHKPOLICY_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSignerChain, DWORD idxCounterSigner)
 
typedef struct _CRYPT_PROVIDER_FUNCTIONS CRYPT_PROVIDER_FUNCTIONS
 
typedef struct _CRYPT_PROVIDER_FUNCTIONSPCRYPT_PROVIDER_FUNCTIONS
 
typedef struct _PROVDATA_SIP PROVDATA_SIP
 
typedef struct _PROVDATA_SIPPPROVDATA_SIP
 
typedef struct _CRYPT_PROVIDER_DATA CRYPT_PROVIDER_DATA
 
typedef struct _CRYPT_PROVIDER_DATAPCRYPT_PROVIDER_DATA
 
typedef struct _CRYPT_PROVIDER_SIGSTATE CRYPT_PROVIDER_SIGSTATE
 
typedef struct _CRYPT_PROVIDER_SIGSTATEPCRYPT_PROVIDER_SIGSTATE
 
typedef BOOL(* PFN_PROVUI_CALL) (HWND hWndSecurityDialog, struct _CRYPT_PROVIDER_DATA *pProvData)
 
typedef struct _CRYPT_PROVUI_FUNCS CRYPT_PROVUI_FUNCS
 
typedef struct _CRYPT_PROVUI_FUNCSPCRYPT_PROVUI_FUNCS
 
typedef BYTE SPC_UUID[SPC_UUID_LENGTH]
 
typedef struct _SPC_SERIALIZED_OBJECT SPC_SERIALIZED_OBJECT
 
typedef struct _SPC_SERIALIZED_OBJECTPSPC_SERIALIZED_OBJECT
 
typedef struct SPC_SIGINFO_ SPC_SIGINFO
 
typedef struct SPC_SIGINFO_PSPC_SIGINFO
 
typedef struct SPC_LINK_ SPC_LINK
 
typedef struct SPC_LINK_PSPC_LINK
 
typedef struct _SPC_PE_IMAGE_DATA SPC_PE_IMAGE_DATA
 
typedef struct _SPC_PE_IMAGE_DATAPSPC_PE_IMAGE_DATA
 
typedef struct _SPC_INDIRECT_DATA_CONTENT SPC_INDIRECT_DATA_CONTENT
 
typedef struct _SPC_INDIRECT_DATA_CONTENTPSPC_INDIRECT_DATA_CONTENT
 
typedef struct _SPC_FINANCIAL_CRITERIA SPC_FINANCIAL_CRITERIA
 
typedef struct _SPC_FINANCIAL_CRITERIAPSPC_FINANCIAL_CRITERIA
 
typedef struct _SPC_IMAGE SPC_IMAGE
 
typedef struct _SPC_IMAGEPSPC_IMAGE
 
typedef struct _SPC_SP_AGENCY_INFO SPC_SP_AGENCY_INFO
 
typedef struct _SPC_SP_AGENCY_INFOPSPC_SP_AGENCY_INFO
 
typedef struct _SPC_STATEMENT_TYPE SPC_STATEMENT_TYPE
 
typedef struct _SPC_STATEMENT_TYPEPSPC_STATEMENT_TYPE
 
typedef struct _SPC_SP_OPUS_INFO SPC_SP_OPUS_INFO
 
typedef struct _SPC_SP_OPUS_INFOPSPC_SP_OPUS_INFO
 
typedef struct _CAT_NAMEVALUE CAT_NAMEVALUE
 
typedef struct _CAT_NAMEVALUEPCAT_NAMEVALUE
 
typedef struct _CAT_MEMBERINFO CAT_MEMBERINFO
 
typedef struct _CAT_MEMBERINFOPCAT_MEMBERINFO
 
typedef struct _WIN_CERTIFICATE WIN_CERTIFICATE
 
typedef struct _WIN_CERTIFICATELPWIN_CERTIFICATE
 
typedef LPVOID WIN_TRUST_SUBJECT
 
typedef struct _WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT
 
typedef struct _WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECTLPWIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT
 
typedef struct _WIN_TRUST_ACTDATA_CONTEXT_SUBJECT_ONLY WIN_TRUST_ACTDATA_CONTEXT_SUBJECT_ONLY
 
typedef struct _WIN_TRUST_ACTDATA_CONTEXT_SUBJECT_ONLYLPWIN_TRUST_ACTDATA_CONTEXT_SUBJECT_ONLY
 
typedef struct _WIN_TRUST_SUBJECT_FILE WIN_TRUST_SUBJECT_FILE
 
typedef struct _WIN_TRUST_SUBJECT_FILELPWIN_TRUST_SUBJECT_FILE
 
typedef struct _WIN_TRUST_SUBJECT_FILE_AND_DISPLAY WIN_TRUST_SUBJECT_FILE_AND_DISPLAY
 
typedef struct _WIN_TRUST_SUBJECT_FILE_AND_DISPLAYLPWIN_TRUST_SUBJECT_FILE_AND_DISPLAY
 

Functions

BOOL WINAPI WintrustAddActionID (GUID *, DWORD, CRYPT_REGISTER_ACTIONID *)
 
BOOL WINAPI WintrustRemoveActionID (GUID *)
 
BOOL WINAPI WintrustLoadFunctionPointers (GUID *, CRYPT_PROVIDER_FUNCTIONS *)
 
BOOL WINAPI WintrustAddDefaultForUsage (const char *, CRYPT_PROVIDER_REGDEFUSAGE *)
 
void WINAPI WintrustGetRegPolicyFlags (DWORD *)
 
BOOL WINAPI WintrustSetRegPolicyFlags (DWORD)
 
LONG WINAPI WinVerifyTrust (HWND, GUID *, LPVOID)
 
HRESULT WINAPI WinVerifyTrustEx (HWND, GUID *, WINTRUST_DATA *)
 
CRYPT_PROVIDER_CERT *WINAPI WTHelperGetProvCertFromChain (CRYPT_PROVIDER_SGNR *pSgnr, DWORD idxCert)
 
CRYPT_PROVIDER_SGNR *WINAPI WTHelperGetProvSignerFromChain (CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSigner, DWORD idxCounterSigner)
 
CRYPT_PROVIDER_DATA *WINAPI WTHelperProvDataFromStateData (HANDLE hStateData)
 
CRYPT_PROVIDER_PRIVDATA *WINAPI WTHelperGetProvPrivateDataFromChain (CRYPT_PROVIDER_DATA *, GUID *)
 

Variables

static const WCHAR WT_PROVIDER_CERTTRUST_FUNCTION []
 

Macro Definition Documentation

◆ CAT_MEMBERINFO_OBJID

#define CAT_MEMBERINFO_OBJID   "1.3.6.1.4.1.311.12.2.2"

Definition at line 499 of file wintrust.h.

◆ CAT_MEMBERINFO_STRUCT

#define CAT_MEMBERINFO_STRUCT   ((LPCSTR) 2222)

Definition at line 513 of file wintrust.h.

◆ CAT_NAMEVALUE_OBJID

#define CAT_NAMEVALUE_OBJID   "1.3.6.1.4.1.311.12.2.1"

Definition at line 498 of file wintrust.h.

◆ CAT_NAMEVALUE_STRUCT

#define CAT_NAMEVALUE_STRUCT   ((LPCSTR) 2221)

Definition at line 512 of file wintrust.h.

◆ CERT_CONFIDENCE_AUTHIDEXT

#define CERT_CONFIDENCE_AUTHIDEXT   0x00010000

Definition at line 227 of file wintrust.h.

◆ CERT_CONFIDENCE_HIGHEST

#define CERT_CONFIDENCE_HIGHEST   0x11111000

Definition at line 229 of file wintrust.h.

◆ CERT_CONFIDENCE_HYGIENE

#define CERT_CONFIDENCE_HYGIENE   0x00001000

Definition at line 228 of file wintrust.h.

◆ CERT_CONFIDENCE_SIG

#define CERT_CONFIDENCE_SIG   0x10000000

Definition at line 224 of file wintrust.h.

◆ CERT_CONFIDENCE_TIME

#define CERT_CONFIDENCE_TIME   0x01000000

Definition at line 225 of file wintrust.h.

◆ CERT_CONFIDENCE_TIMENEST

#define CERT_CONFIDENCE_TIMENEST   0x00100000

Definition at line 226 of file wintrust.h.

◆ CPD_CHOICE_SIP

#define CPD_CHOICE_SIP   1

Definition at line 384 of file wintrust.h.

◆ CPD_REVOCATION_CHECK_CHAIN

#define CPD_REVOCATION_CHECK_CHAIN   0x00040000

Definition at line 389 of file wintrust.h.

◆ CPD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT

#define CPD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT   0x00080000

Definition at line 390 of file wintrust.h.

◆ CPD_REVOCATION_CHECK_END_CERT

#define CPD_REVOCATION_CHECK_END_CERT   0x00020000

Definition at line 388 of file wintrust.h.

◆ CPD_REVOCATION_CHECK_NONE

#define CPD_REVOCATION_CHECK_NONE   0x00010000

Definition at line 387 of file wintrust.h.

◆ CPD_UISTATE_MODE_ALLOW

#define CPD_UISTATE_MODE_ALLOW   0x00000002

Definition at line 394 of file wintrust.h.

◆ CPD_UISTATE_MODE_BLOCK

#define CPD_UISTATE_MODE_BLOCK   0x00000001

Definition at line 393 of file wintrust.h.

◆ CPD_UISTATE_MODE_MASK

#define CPD_UISTATE_MODE_MASK   0x00000003

Definition at line 395 of file wintrust.h.

◆ CPD_UISTATE_MODE_PROMPT

#define CPD_UISTATE_MODE_PROMPT   0x00000000

Definition at line 392 of file wintrust.h.

◆ CPD_USE_NT5_CHAIN_FLAG

#define CPD_USE_NT5_CHAIN_FLAG   0x80000000

Definition at line 386 of file wintrust.h.

◆ SGNR_TYPE_TIMESTAMP

#define SGNR_TYPE_TIMESTAMP   0x00000010

Definition at line 244 of file wintrust.h.

◆ SPC_CAB_DATA_OBJID

#define SPC_CAB_DATA_OBJID   "1.3.6.1.4.1.311.2.1.25"

Definition at line 492 of file wintrust.h.

◆ SPC_CAB_DATA_STRUCT

#define SPC_CAB_DATA_STRUCT   ((LPCSTR) 2008)

Definition at line 509 of file wintrust.h.

◆ SPC_CERT_EXTENSIONS_OBJID

#define SPC_CERT_EXTENSIONS_OBJID   "1.3.6.1.4.1.311.2.1.14"

Definition at line 485 of file wintrust.h.

◆ SPC_COMMERCIAL_SP_KEY_PURPOSE_OBJID

#define SPC_COMMERCIAL_SP_KEY_PURPOSE_OBJID   "1.3.6.1.4.1.311.2.1.22"

Definition at line 491 of file wintrust.h.

◆ SPC_FILE_LINK_CHOICE

#define SPC_FILE_LINK_CHOICE   3

Definition at line 537 of file wintrust.h.

◆ SPC_FINANCIAL_CRITERIA_OBJID

#define SPC_FINANCIAL_CRITERIA_OBJID   "1.3.6.1.4.1.311.2.1.27"

Definition at line 495 of file wintrust.h.

◆ SPC_FINANCIAL_CRITERIA_STRUCT

#define SPC_FINANCIAL_CRITERIA_STRUCT   ((LPCSTR) 2002)

Definition at line 503 of file wintrust.h.

◆ SPC_GLUE_RDN_OBJID

#define SPC_GLUE_RDN_OBJID   "1.3.6.1.4.1.311.2.1.25"

Definition at line 493 of file wintrust.h.

◆ SPC_INDIRECT_DATA_CONTENT_STRUCT

#define SPC_INDIRECT_DATA_CONTENT_STRUCT   ((LPCSTR) 2003)

Definition at line 504 of file wintrust.h.

◆ SPC_INDIRECT_DATA_OBJID

#define SPC_INDIRECT_DATA_OBJID   "1.3.6.1.4.1.311.2.1.4"

Definition at line 481 of file wintrust.h.

◆ SPC_INDIVIDUAL_SP_KEY_PURPOSE_OBJID

#define SPC_INDIVIDUAL_SP_KEY_PURPOSE_OBJID   "1.3.6.1.4.1.311.2.1.21"

Definition at line 490 of file wintrust.h.

◆ SPC_JAVA_CLASS_DATA_OBJID

#define SPC_JAVA_CLASS_DATA_OBJID   "1.3.6.1.4.1.311.2.1.20"

Definition at line 489 of file wintrust.h.

◆ SPC_JAVA_CLASS_DATA_STRUCT

#define SPC_JAVA_CLASS_DATA_STRUCT   ((LPCSTR) 2009)

Definition at line 510 of file wintrust.h.

◆ SPC_LINK_OBJID

#define SPC_LINK_OBJID   "1.3.6.1.4.1.311.2.1.28"

Definition at line 496 of file wintrust.h.

◆ SPC_LINK_STRUCT

#define SPC_LINK_STRUCT   ((LPCSTR) 2005)

Definition at line 506 of file wintrust.h.

◆ SPC_MINIMAL_CRITERIA_OBJID

#define SPC_MINIMAL_CRITERIA_OBJID   "1.3.6.1.4.1.311.2.1.26"

Definition at line 494 of file wintrust.h.

◆ SPC_MINIMAL_CRITERIA_STRUCT

#define SPC_MINIMAL_CRITERIA_STRUCT   ((LPCSTR) 2001)

Definition at line 502 of file wintrust.h.

◆ SPC_MONIKER_LINK_CHOICE

#define SPC_MONIKER_LINK_CHOICE   2

Definition at line 536 of file wintrust.h.

◆ SPC_PE_IMAGE_DATA_OBJID

#define SPC_PE_IMAGE_DATA_OBJID   "1.3.6.1.4.1.311.2.1.15"

Definition at line 486 of file wintrust.h.

◆ SPC_PE_IMAGE_DATA_STRUCT

#define SPC_PE_IMAGE_DATA_STRUCT   ((LPCSTR) 2004)

Definition at line 505 of file wintrust.h.

◆ SPC_RAW_FILE_DATA_OBJID

#define SPC_RAW_FILE_DATA_OBJID   "1.3.6.1.4.1.311.2.1.18"

Definition at line 487 of file wintrust.h.

◆ SPC_SIGINFO_OBJID

#define SPC_SIGINFO_OBJID   "1.3.6.1.4.1.311.2.1.30"

Definition at line 497 of file wintrust.h.

◆ SPC_SIGINFO_STRUCT

#define SPC_SIGINFO_STRUCT   ((LPCSTR) 2130)

Definition at line 511 of file wintrust.h.

◆ SPC_SP_AGENCY_INFO_OBJID

#define SPC_SP_AGENCY_INFO_OBJID   "1.3.6.1.4.1.311.2.1.10"

Definition at line 482 of file wintrust.h.

◆ SPC_SP_AGENCY_INFO_STRUCT

#define SPC_SP_AGENCY_INFO_STRUCT   ((LPCSTR) 2000)

Definition at line 501 of file wintrust.h.

◆ SPC_SP_OPUS_INFO_OBJID

#define SPC_SP_OPUS_INFO_OBJID   "1.3.6.1.4.1.311.2.1.12"

Definition at line 484 of file wintrust.h.

◆ SPC_SP_OPUS_INFO_STRUCT

#define SPC_SP_OPUS_INFO_STRUCT   ((LPCSTR) 2007)

Definition at line 508 of file wintrust.h.

◆ SPC_STATEMENT_TYPE_OBJID

#define SPC_STATEMENT_TYPE_OBJID   "1.3.6.1.4.1.311.2.1.11"

Definition at line 483 of file wintrust.h.

◆ SPC_STATEMENT_TYPE_STRUCT

#define SPC_STATEMENT_TYPE_STRUCT   ((LPCSTR) 2006)

Definition at line 507 of file wintrust.h.

◆ SPC_STRUCTURED_STORAGE_DATA_OBJID

#define SPC_STRUCTURED_STORAGE_DATA_OBJID   "1.3.6.1.4.1.311.2.1.19"

Definition at line 488 of file wintrust.h.

◆ SPC_URL_LINK_CHOICE

#define SPC_URL_LINK_CHOICE   1

Definition at line 535 of file wintrust.h.

◆ SPC_UUID_LENGTH

#define SPC_UUID_LENGTH   16

Definition at line 515 of file wintrust.h.

◆ TRUSTERROR_MAX_STEPS

#define TRUSTERROR_MAX_STEPS   38

Definition at line 282 of file wintrust.h.

◆ TRUSTERROR_STEP_CATALOGFILE

#define TRUSTERROR_STEP_CATALOGFILE   6

Definition at line 259 of file wintrust.h.

◆ TRUSTERROR_STEP_CERTSTORE

#define TRUSTERROR_STEP_CERTSTORE   7

Definition at line 260 of file wintrust.h.

◆ TRUSTERROR_STEP_FILEIO

#define TRUSTERROR_STEP_FILEIO   2

Definition at line 256 of file wintrust.h.

◆ TRUSTERROR_STEP_FINAL_CERTCHKPROV

#define TRUSTERROR_STEP_FINAL_CERTCHKPROV   35

Definition at line 278 of file wintrust.h.

◆ TRUSTERROR_STEP_FINAL_CERTPROV

#define TRUSTERROR_STEP_FINAL_CERTPROV   34

Definition at line 277 of file wintrust.h.

◆ TRUSTERROR_STEP_FINAL_INITPROV

#define TRUSTERROR_STEP_FINAL_INITPROV   31

Definition at line 274 of file wintrust.h.

◆ TRUSTERROR_STEP_FINAL_OBJPROV

#define TRUSTERROR_STEP_FINAL_OBJPROV   32

Definition at line 275 of file wintrust.h.

◆ TRUSTERROR_STEP_FINAL_POLICYPROV

#define TRUSTERROR_STEP_FINAL_POLICYPROV   36

Definition at line 279 of file wintrust.h.

◆ TRUSTERROR_STEP_FINAL_SIGPROV

#define TRUSTERROR_STEP_FINAL_SIGPROV   33

Definition at line 276 of file wintrust.h.

◆ TRUSTERROR_STEP_FINAL_UIPROV

#define TRUSTERROR_STEP_FINAL_UIPROV   37

Definition at line 280 of file wintrust.h.

◆ TRUSTERROR_STEP_FINAL_WVTINIT

#define TRUSTERROR_STEP_FINAL_WVTINIT   30

Definition at line 273 of file wintrust.h.

◆ TRUSTERROR_STEP_MESSAGE

#define TRUSTERROR_STEP_MESSAGE   8

Definition at line 261 of file wintrust.h.

◆ TRUSTERROR_STEP_MSG_CERTCHAIN

#define TRUSTERROR_STEP_MSG_CERTCHAIN   15

Definition at line 268 of file wintrust.h.

◆ TRUSTERROR_STEP_MSG_COUNTERSIGCERT

#define TRUSTERROR_STEP_MSG_COUNTERSIGCERT   17

Definition at line 270 of file wintrust.h.

◆ TRUSTERROR_STEP_MSG_COUNTERSIGINFO

#define TRUSTERROR_STEP_MSG_COUNTERSIGINFO   16

Definition at line 269 of file wintrust.h.

◆ TRUSTERROR_STEP_MSG_INNERCNT

#define TRUSTERROR_STEP_MSG_INNERCNT   11

Definition at line 264 of file wintrust.h.

◆ TRUSTERROR_STEP_MSG_INNERCNTTYPE

#define TRUSTERROR_STEP_MSG_INNERCNTTYPE   10

Definition at line 263 of file wintrust.h.

◆ TRUSTERROR_STEP_MSG_SIGNERCERT

#define TRUSTERROR_STEP_MSG_SIGNERCERT   14

Definition at line 267 of file wintrust.h.

◆ TRUSTERROR_STEP_MSG_SIGNERCOUNT

#define TRUSTERROR_STEP_MSG_SIGNERCOUNT   9

Definition at line 262 of file wintrust.h.

◆ TRUSTERROR_STEP_MSG_SIGNERINFO

#define TRUSTERROR_STEP_MSG_SIGNERINFO   13

Definition at line 266 of file wintrust.h.

◆ TRUSTERROR_STEP_MSG_STORE

#define TRUSTERROR_STEP_MSG_STORE   12

Definition at line 265 of file wintrust.h.

◆ TRUSTERROR_STEP_SIP

#define TRUSTERROR_STEP_SIP   3

Definition at line 257 of file wintrust.h.

◆ TRUSTERROR_STEP_SIPSUBJINFO

#define TRUSTERROR_STEP_SIPSUBJINFO   5

Definition at line 258 of file wintrust.h.

◆ TRUSTERROR_STEP_VERIFY_MSGHASH

#define TRUSTERROR_STEP_VERIFY_MSGHASH   18

Definition at line 271 of file wintrust.h.

◆ TRUSTERROR_STEP_VERIFY_MSGINDIRECTDATA

#define TRUSTERROR_STEP_VERIFY_MSGINDIRECTDATA   19

Definition at line 272 of file wintrust.h.

◆ TRUSTERROR_STEP_WVTPARAMS

#define TRUSTERROR_STEP_WVTPARAMS   0

Definition at line 255 of file wintrust.h.

◆ WIN_CERT_REVISION_1_0

#define WIN_CERT_REVISION_1_0   0x0100

Definition at line 623 of file wintrust.h.

◆ WIN_CERT_REVISION_2_0

#define WIN_CERT_REVISION_2_0   0x0200

Definition at line 624 of file wintrust.h.

◆ WIN_CERT_TYPE_PKCS_SIGNED_DATA

#define WIN_CERT_TYPE_PKCS_SIGNED_DATA   0x0002 /* PKCS SignedData */

Definition at line 627 of file wintrust.h.

◆ WIN_CERT_TYPE_RESERVED_1

#define WIN_CERT_TYPE_RESERVED_1   0x0003 /* Reserved */

Definition at line 628 of file wintrust.h.

◆ WIN_CERT_TYPE_TS_STACK_SIGNED

#define WIN_CERT_TYPE_TS_STACK_SIGNED   0x0004

Definition at line 629 of file wintrust.h.

◆ WIN_CERT_TYPE_X509

#define WIN_CERT_TYPE_X509   0x0001 /* X.509 Certificate */

Definition at line 626 of file wintrust.h.

◆ WIN_SPUB_ACTION_PUBLISHED_SOFTWARE

#define WIN_SPUB_ACTION_PUBLISHED_SOFTWARE   { 0x64b9d180, 0x8da2, 0x11cf, { 0x87,0x36,0x00,0xaa,0x00,0xa4,0x85,0xeb }}

Definition at line 661 of file wintrust.h.

◆ WSS_CERTTRUST_SUPPORT

#define WSS_CERTTRUST_SUPPORT   0x00000004

Definition at line 416 of file wintrust.h.

◆ WSS_GET_SECONDARY_SIG_COUNT

#define WSS_GET_SECONDARY_SIG_COUNT   0x00000002

Definition at line 156 of file wintrust.h.

◆ WSS_INPUT_FLAG_MASK

#define WSS_INPUT_FLAG_MASK   0x00000007

Definition at line 158 of file wintrust.h.

◆ WSS_OBJTRUST_SUPPORT

#define WSS_OBJTRUST_SUPPORT   0x00000001

Definition at line 414 of file wintrust.h.

◆ WSS_OUT_FILE_SUPPORTS_SEAL

#define WSS_OUT_FILE_SUPPORTS_SEAL   0x20000000

Definition at line 162 of file wintrust.h.

◆ WSS_OUT_HAS_SEALING_INTENT

#define WSS_OUT_HAS_SEALING_INTENT   0x40000000

Definition at line 161 of file wintrust.h.

◆ WSS_OUT_SEALING_STATUS_VERIFIED

#define WSS_OUT_SEALING_STATUS_VERIFIED   0x80000000

Definition at line 160 of file wintrust.h.

◆ WSS_OUTPUT_FLAG_MASK

#define WSS_OUTPUT_FLAG_MASK   0xe0000000

Definition at line 163 of file wintrust.h.

◆ WSS_SIGTRUST_SUPPORT

#define WSS_SIGTRUST_SUPPORT   0x00000002

Definition at line 415 of file wintrust.h.

◆ WSS_VERIFY_SEALING

#define WSS_VERIFY_SEALING   0x00000004

Definition at line 157 of file wintrust.h.

◆ WSS_VERIFY_SPECIFIC

#define WSS_VERIFY_SPECIFIC   0x00000001

Definition at line 155 of file wintrust.h.

◆ WT_ADD_ACTION_ID_RET_RESULT_FLAG

#define WT_ADD_ACTION_ID_RET_RESULT_FLAG   1

Definition at line 448 of file wintrust.h.

◆ WTCI_DONT_OPEN_STORES

#define WTCI_DONT_OPEN_STORES   0x00000001

Definition at line 79 of file wintrust.h.

◆ WTCI_OPEN_ONLY_ROOT

#define WTCI_OPEN_ONLY_ROOT   0x00000002

Definition at line 80 of file wintrust.h.

◆ WTD_CACHE_ONLY_URL_RETRIEVAL

#define WTD_CACHE_ONLY_URL_RETRIEVAL   0x00001000

Definition at line 140 of file wintrust.h.

◆ WTD_CHOICE_BLOB

#define WTD_CHOICE_BLOB   3

Definition at line 93 of file wintrust.h.

◆ WTD_CHOICE_CATALOG

#define WTD_CHOICE_CATALOG   2

Definition at line 92 of file wintrust.h.

◆ WTD_CHOICE_CERT

#define WTD_CHOICE_CERT   5

Definition at line 95 of file wintrust.h.

◆ WTD_CHOICE_FILE

#define WTD_CHOICE_FILE   1

Definition at line 91 of file wintrust.h.

◆ WTD_CHOICE_SIGNER

#define WTD_CHOICE_SIGNER   4

Definition at line 94 of file wintrust.h.

◆ WTD_HASH_ONLY_FLAG

#define WTD_HASH_ONLY_FLAG   0x00000200

Definition at line 137 of file wintrust.h.

◆ WTD_LIFETIME_SIGNING_FLAG

#define WTD_LIFETIME_SIGNING_FLAG   0x00000800

Definition at line 139 of file wintrust.h.

◆ WTD_NO_IE4_CHAIN_FLAG

#define WTD_NO_IE4_CHAIN_FLAG   0x00000002

Definition at line 130 of file wintrust.h.

◆ WTD_NO_POLICY_USAGE_FLAG

#define WTD_NO_POLICY_USAGE_FLAG   0x00000004

Definition at line 131 of file wintrust.h.

◆ WTD_PROV_FLAGS_MASK

#define WTD_PROV_FLAGS_MASK   0x0000ffff

Definition at line 128 of file wintrust.h.

◆ WTD_REVOCATION_CHECK_CHAIN

#define WTD_REVOCATION_CHECK_CHAIN   0x00000040

Definition at line 134 of file wintrust.h.

◆ WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT

#define WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT   0x00000080

Definition at line 135 of file wintrust.h.

◆ WTD_REVOCATION_CHECK_END_CERT

#define WTD_REVOCATION_CHECK_END_CERT   0x00000020

Definition at line 133 of file wintrust.h.

◆ WTD_REVOCATION_CHECK_NONE

#define WTD_REVOCATION_CHECK_NONE   0x00000010

Definition at line 132 of file wintrust.h.

◆ WTD_REVOKE_NONE

#define WTD_REVOKE_NONE   0

Definition at line 88 of file wintrust.h.

◆ WTD_REVOKE_WHOLECHAIN

#define WTD_REVOKE_WHOLECHAIN   1

Definition at line 89 of file wintrust.h.

◆ WTD_SAFER_FLAG

#define WTD_SAFER_FLAG   0x00000100

Definition at line 136 of file wintrust.h.

◆ WTD_STATEACTION_AUTO_CACHE

#define WTD_STATEACTION_AUTO_CACHE   3

Definition at line 125 of file wintrust.h.

◆ WTD_STATEACTION_AUTO_CACHE_FLUSH

#define WTD_STATEACTION_AUTO_CACHE_FLUSH   4

Definition at line 126 of file wintrust.h.

◆ WTD_STATEACTION_CLOSE

#define WTD_STATEACTION_CLOSE   2

Definition at line 124 of file wintrust.h.

◆ WTD_STATEACTION_IGNORE

#define WTD_STATEACTION_IGNORE   0

Definition at line 122 of file wintrust.h.

◆ WTD_STATEACTION_VERIFY

#define WTD_STATEACTION_VERIFY   1

Definition at line 123 of file wintrust.h.

◆ WTD_UI_ALL

#define WTD_UI_ALL   1

Definition at line 83 of file wintrust.h.

◆ WTD_UI_NOBAD

#define WTD_UI_NOBAD   3

Definition at line 85 of file wintrust.h.

◆ WTD_UI_NOGOOD

#define WTD_UI_NOGOOD   4

Definition at line 86 of file wintrust.h.

◆ WTD_UI_NONE

#define WTD_UI_NONE   2

Definition at line 84 of file wintrust.h.

◆ WTD_UICONTEXT_EXECUTE

#define WTD_UICONTEXT_EXECUTE   0

Definition at line 142 of file wintrust.h.

◆ WTD_UICONTEXT_INSTALL

#define WTD_UICONTEXT_INSTALL   1

Definition at line 143 of file wintrust.h.

◆ WTD_USE_DEFAULT_OSVER_CHECK

#define WTD_USE_DEFAULT_OSVER_CHECK   0x00000400

Definition at line 138 of file wintrust.h.

◆ WTD_USE_IE4_TRUST_FLAG

#define WTD_USE_IE4_TRUST_FLAG   0x00000001

Definition at line 129 of file wintrust.h.

◆ WTPF_ALLOWONLYPERTRUST

#define WTPF_ALLOWONLYPERTRUST   0x00040000

Definition at line 446 of file wintrust.h.

◆ WTPF_IGNOREEXPIRATION

#define WTPF_IGNOREEXPIRATION   0x00000100

Definition at line 438 of file wintrust.h.

◆ WTPF_IGNOREREVOCATIONONTS

#define WTPF_IGNOREREVOCATIONONTS   0x00020000

Definition at line 445 of file wintrust.h.

◆ WTPF_IGNOREREVOKATION

#define WTPF_IGNOREREVOKATION   0x00000200

Definition at line 439 of file wintrust.h.

◆ WTPF_OFFLINEOK_COM

#define WTPF_OFFLINEOK_COM   0x00000800

Definition at line 441 of file wintrust.h.

◆ WTPF_OFFLINEOK_IND

#define WTPF_OFFLINEOK_IND   0x00000400

Definition at line 440 of file wintrust.h.

◆ WTPF_OFFLINEOKNBU_COM

#define WTPF_OFFLINEOKNBU_COM   0x00002000

Definition at line 443 of file wintrust.h.

◆ WTPF_OFFLINEOKNBU_IND

#define WTPF_OFFLINEOKNBU_IND   0x00001000

Definition at line 442 of file wintrust.h.

◆ WTPF_TESTCANBEVALID

#define WTPF_TESTCANBEVALID   0x00000080

Definition at line 437 of file wintrust.h.

◆ WTPF_TRUSTTEST

#define WTPF_TRUSTTEST   0x00000020

Definition at line 436 of file wintrust.h.

◆ WTPF_VERIFY_V1_OFF

#define WTPF_VERIFY_V1_OFF   0x00010000

Definition at line 444 of file wintrust.h.

◆ WVT_IS_CBSTRUCT_GT_MEMBEROFFSET

#define WVT_IS_CBSTRUCT_GT_MEMBEROFFSET (   t,
  s,
  f 
)    WVT_ISINSTRUCT(t,s,f)

Definition at line 434 of file wintrust.h.

◆ WVT_ISINSTRUCT

#define WVT_ISINSTRUCT (   t,
  s,
  f 
)    (WVT_OFFSETOF(t,f) + sizeof(((t*)0)->f) <= (s))

Definition at line 433 of file wintrust.h.

◆ WVT_OFFSETOF

#define WVT_OFFSETOF (   t,
  f 
)    ((ULONG)((ULONG_PTR)(&((t*)0)->f)))

Definition at line 432 of file wintrust.h.

Typedef Documentation

◆ __WINE_ALLOC_SIZE

typedef void* __WINE_ALLOC_SIZE(1) WINAPI *PFN_CPD_MEM_ALLOC)(DWORD cbSize)

Definition at line 284 of file wintrust.h.

◆ CAT_MEMBERINFO

◆ CAT_NAMEVALUE

◆ CRYPT_PROVIDER_CERT

◆ CRYPT_PROVIDER_DATA

◆ CRYPT_PROVIDER_FUNCTIONS

◆ CRYPT_PROVIDER_PRIVDATA

◆ CRYPT_PROVIDER_REGDEFUSAGE

◆ CRYPT_PROVIDER_SGNR

◆ CRYPT_PROVIDER_SIGSTATE

◆ CRYPT_PROVUI_DATA

◆ CRYPT_PROVUI_FUNCS

◆ CRYPT_REGISTER_ACTIONID

◆ CRYPT_TRUST_REG_ENTRY

◆ LPWIN_CERTIFICATE

Definition at line 36 of file integrity.c.

◆ LPWIN_TRUST_ACTDATA_CONTEXT_SUBJECT_ONLY

◆ LPWIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT

◆ LPWIN_TRUST_SUBJECT_FILE

◆ LPWIN_TRUST_SUBJECT_FILE_AND_DISPLAY

◆ PCAT_MEMBERINFO

◆ PCAT_NAMEVALUE

◆ PCRYPT_PROVIDER_CERT

◆ PCRYPT_PROVIDER_DATA

◆ PCRYPT_PROVIDER_FUNCTIONS

◆ PCRYPT_PROVIDER_PRIVDATA

◆ PCRYPT_PROVIDER_REGDEFUSAGE

◆ PCRYPT_PROVIDER_SGNR

◆ PCRYPT_PROVIDER_SIGSTATE

◆ PCRYPT_PROVUI_DATA

◆ PCRYPT_PROVUI_FUNCS

◆ PCRYPT_REGISTER_ACTIONID

◆ PCRYPT_TRUST_REG_ENTRY

◆ PFN_CPD_ADD_CERT

typedef BOOL(WINAPI * PFN_CPD_ADD_CERT) (struct _CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSigner, DWORD idxCounterSigner, PCCERT_CONTEXT pCert2Add)

Definition at line 290 of file wintrust.h.

◆ PFN_CPD_ADD_PRIVDATA

typedef BOOL(WINAPI * PFN_CPD_ADD_PRIVDATA) (struct _CRYPT_PROVIDER_DATA *pProvData, struct _CRYPT_PROVIDER_PRIVDATA *pPrivData2Add)

Definition at line 293 of file wintrust.h.

◆ PFN_CPD_ADD_SGNR

typedef BOOL(WINAPI * PFN_CPD_ADD_SGNR) (struct _CRYPT_PROVIDER_DATA *pProvData, BOOL fCounterSigner, DWORD idxSigner, struct _CRYPT_PROVIDER_SGNR *pSgnr2Add)

Definition at line 288 of file wintrust.h.

◆ PFN_CPD_ADD_STORE

typedef BOOL(WINAPI * PFN_CPD_ADD_STORE) (struct _CRYPT_PROVIDER_DATA *pProvData, HCERTSTORE hStore2Add)

Definition at line 286 of file wintrust.h.

◆ PFN_CPD_MEM_FREE

typedef void(WINAPI * PFN_CPD_MEM_FREE) (void *pvMem2Free)

Definition at line 285 of file wintrust.h.

◆ PFN_PROVIDER_CERTCHKPOLICY_CALL

typedef BOOL(WINAPI * PFN_PROVIDER_CERTCHKPOLICY_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSignerChain, DWORD idxCounterSigner)

Definition at line 309 of file wintrust.h.

◆ PFN_PROVIDER_CERTTRUST_CALL

typedef HRESULT(WINAPI * PFN_PROVIDER_CERTTRUST_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)

Definition at line 301 of file wintrust.h.

◆ PFN_PROVIDER_CLEANUP_CALL

typedef HRESULT(WINAPI * PFN_PROVIDER_CLEANUP_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)

Definition at line 307 of file wintrust.h.

◆ PFN_PROVIDER_FINALPOLICY_CALL

typedef HRESULT(WINAPI * PFN_PROVIDER_FINALPOLICY_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)

Definition at line 303 of file wintrust.h.

◆ PFN_PROVIDER_INIT_CALL

typedef HRESULT(WINAPI * PFN_PROVIDER_INIT_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)

Definition at line 295 of file wintrust.h.

◆ PFN_PROVIDER_OBJTRUST_CALL

typedef HRESULT(WINAPI * PFN_PROVIDER_OBJTRUST_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)

Definition at line 297 of file wintrust.h.

◆ PFN_PROVIDER_SIGTRUST_CALL

typedef HRESULT(WINAPI * PFN_PROVIDER_SIGTRUST_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)

Definition at line 299 of file wintrust.h.

◆ PFN_PROVIDER_TESTFINALPOLICY_CALL

typedef HRESULT(WINAPI * PFN_PROVIDER_TESTFINALPOLICY_CALL) (struct _CRYPT_PROVIDER_DATA *pProvData)

Definition at line 305 of file wintrust.h.

◆ PFN_PROVUI_CALL

typedef BOOL(* PFN_PROVUI_CALL) (HWND hWndSecurityDialog, struct _CRYPT_PROVIDER_DATA *pProvData)

Definition at line 418 of file wintrust.h.

◆ PPROVDATA_SIP

◆ PROVDATA_SIP

◆ PSPC_FINANCIAL_CRITERIA

◆ PSPC_IMAGE

◆ PSPC_INDIRECT_DATA_CONTENT

◆ PSPC_LINK

◆ PSPC_PE_IMAGE_DATA

◆ PSPC_SERIALIZED_OBJECT

◆ PSPC_SIGINFO

◆ PSPC_SP_AGENCY_INFO

◆ PSPC_SP_OPUS_INFO

◆ PSPC_STATEMENT_TYPE

◆ PWINTRUST_BLOB_INFO

◆ PWINTRUST_CATALOG_INFO

◆ PWINTRUST_CERT_INFO

◆ PWINTRUST_DATA

◆ PWINTRUST_FILE_INFO

◆ PWINTRUST_SGNR_INFO

◆ PWINTRUST_SIGNATURE_SETTINGS

◆ SPC_FINANCIAL_CRITERIA

◆ SPC_IMAGE

◆ SPC_INDIRECT_DATA_CONTENT

◆ SPC_LINK

◆ SPC_PE_IMAGE_DATA

◆ SPC_SERIALIZED_OBJECT

◆ SPC_SIGINFO

◆ SPC_SP_AGENCY_INFO

◆ SPC_SP_OPUS_INFO

◆ SPC_STATEMENT_TYPE

◆ SPC_UUID

typedef BYTE SPC_UUID[SPC_UUID_LENGTH]

Definition at line 516 of file wintrust.h.

◆ WIN_CERTIFICATE

◆ WIN_TRUST_ACTDATA_CONTEXT_SUBJECT_ONLY

◆ WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT

◆ WIN_TRUST_SUBJECT

Definition at line 631 of file wintrust.h.

◆ WIN_TRUST_SUBJECT_FILE

◆ WIN_TRUST_SUBJECT_FILE_AND_DISPLAY

◆ WINTRUST_BLOB_INFO

◆ WINTRUST_CATALOG_INFO

◆ WINTRUST_CERT_INFO

◆ WINTRUST_DATA

◆ WINTRUST_FILE_INFO

◆ WINTRUST_SGNR_INFO

◆ WINTRUST_SIGNATURE_SETTINGS

Function Documentation

◆ WintrustAddActionID()

BOOL WINAPI WintrustAddActionID ( GUID ,
DWORD  ,
CRYPT_REGISTER_ACTIONID  
)

Definition at line 238 of file register.c.

240 {
241  WCHAR GuidString[39];
242  LONG Res;
243  LONG WriteActionError = ERROR_SUCCESS;
244 
245  TRACE("%s %x %p\n", debugstr_guid(pgActionID), fdwFlags, psProvInfo);
246 
247  /* Some sanity checks.
248  * We use the W2K3 last error as it makes more sense (W2K leaves the last error
249  * as is).
250  */
251  if (!pgActionID ||
252  !psProvInfo ||
253  (psProvInfo->cbStruct != sizeof(CRYPT_REGISTER_ACTIONID)))
254  {
256  return FALSE;
257  }
258 
259  /* Create this string only once, instead of in the helper function */
260  WINTRUST_Guid2Wstr( pgActionID, GuidString);
261 
262  /* Write the information to the registry */
263  Res = WINTRUST_WriteProviderToReg(GuidString, Initialization , psProvInfo->sInitProvider);
264  if (Res != ERROR_SUCCESS) WriteActionError = Res;
265  Res = WINTRUST_WriteProviderToReg(GuidString, Message , psProvInfo->sObjectProvider);
266  if (Res != ERROR_SUCCESS) WriteActionError = Res;
267  Res = WINTRUST_WriteProviderToReg(GuidString, Signature , psProvInfo->sSignatureProvider);
268  if (Res != ERROR_SUCCESS) WriteActionError = Res;
269  Res = WINTRUST_WriteProviderToReg(GuidString, Certificate , psProvInfo->sCertificateProvider);
270  if (Res != ERROR_SUCCESS) WriteActionError = Res;
271  Res = WINTRUST_WriteProviderToReg(GuidString, CertCheck , psProvInfo->sCertificatePolicyProvider);
272  if (Res != ERROR_SUCCESS) WriteActionError = Res;
273  Res = WINTRUST_WriteProviderToReg(GuidString, FinalPolicy , psProvInfo->sFinalPolicyProvider);
274  if (Res != ERROR_SUCCESS) WriteActionError = Res;
275  Res = WINTRUST_WriteProviderToReg(GuidString, DiagnosticPolicy, psProvInfo->sTestPolicyProvider);
276  if (Res != ERROR_SUCCESS) WriteActionError = Res;
277  Res = WINTRUST_WriteProviderToReg(GuidString, Cleanup , psProvInfo->sCleanupProvider);
278  if (Res != ERROR_SUCCESS) WriteActionError = Res;
279 
280  /* Testing (by restricting access to the registry for some keys) shows that the last failing function
281  * will be used for last error.
282  * If the flag WT_ADD_ACTION_ID_RET_RESULT_FLAG is set and there are errors when adding the action
283  * we have to return FALSE. Errors includes both invalid entries as well as registry errors.
284  * Testing also showed that one error doesn't stop the registry writes. Every action will be dealt with.
285  */
286 
287  if (WriteActionError != ERROR_SUCCESS)
288  {
289  SetLastError(WriteActionError);
290 
291  if (fdwFlags == WT_ADD_ACTION_ID_RET_RESULT_FLAG)
292  return FALSE;
293  }
294 
295  return TRUE;
296 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
static LONG WINTRUST_WriteProviderToReg(WCHAR *GuidString, const WCHAR *FunctionType, CRYPT_TRUST_REG_ENTRY RegEntry)
Definition: register.c:179
static PWSTR GuidString
Definition: apphelp.c:91
static const WCHAR Message[]
Definition: register.c:74
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
static const WCHAR Certificate[]
Definition: register.c:76
static const WCHAR FinalPolicy[]
Definition: register.c:78
static const WCHAR CertCheck[]
Definition: register.c:77
static const WCHAR DiagnosticPolicy[]
Definition: register.c:79
long LONG
Definition: pedump.c:60
static void WINTRUST_Guid2Wstr(const GUID *pgActionID, WCHAR *GuidString)
Definition: register.c:162
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR Signature[]
Definition: register.c:75
#define SetLastError(x)
Definition: compat.h:409
static const WCHAR Cleanup[]
Definition: register.c:80
#define WT_ADD_ACTION_ID_RET_RESULT_FLAG
Definition: wintrust.h:448
static const WCHAR Initialization[]
Definition: register.c:73

Referenced by DllRegisterServer(), InitFunctionPtrs(), WINTRUST_RegisterDriverVerify(), WINTRUST_RegisterGenCertVerify(), WINTRUST_RegisterGenChainVerify(), WINTRUST_RegisterGenVerifyV2(), WINTRUST_RegisterHttpsProv(), WINTRUST_RegisterOfficeSignVerify(), WINTRUST_RegisterPublishedSoftware(), WINTRUST_RegisterPublishedSoftwareNoBadUi(), and WINTRUST_RegisterTrustProviderTest().

◆ WintrustAddDefaultForUsage()

BOOL WINAPI WintrustAddDefaultForUsage ( const char ,
CRYPT_PROVIDER_REGDEFUSAGE  
)

Definition at line 733 of file register.c.

735 {
736  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};
737  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};
738  LONG Res = ERROR_SUCCESS;
739  LONG WriteUsageError = ERROR_SUCCESS;
740  DWORD Len;
741  WCHAR GuidString[39];
742 
743  TRACE("(%s %p)\n", debugstr_a(pszUsageOID), psDefUsage);
744 
745  /* Some sanity checks. */
746  if (!pszUsageOID ||
747  !psDefUsage ||
748  !psDefUsage->pgActionID ||
749  (psDefUsage->cbStruct != sizeof(CRYPT_PROVIDER_REGDEFUSAGE)))
750  {
752  return FALSE;
753  }
754 
755  if (psDefUsage->pwszDllName)
756  {
757  Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, Dll, psDefUsage->pwszDllName);
758  if (Res != ERROR_SUCCESS) WriteUsageError = Res;
759  }
760  if (psDefUsage->pwszLoadCallbackDataFunctionName)
761  {
762  WCHAR* CallbackW;
763 
764  Len = MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszLoadCallbackDataFunctionName, -1, NULL, 0 );
765  CallbackW = WINTRUST_Alloc( Len * sizeof(WCHAR) );
766  MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszLoadCallbackDataFunctionName, -1, CallbackW, Len );
767 
768  Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, CBAlloc, CallbackW);
769  if (Res != ERROR_SUCCESS) WriteUsageError = Res;
770 
771  WINTRUST_Free(CallbackW);
772  }
773  if (psDefUsage->pwszFreeCallbackDataFunctionName)
774  {
775  WCHAR* CallbackW;
776 
777  Len = MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszFreeCallbackDataFunctionName, -1, NULL, 0 );
778  CallbackW = WINTRUST_Alloc( Len * sizeof(WCHAR) );
779  MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszFreeCallbackDataFunctionName, -1, CallbackW, Len );
780 
781  Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, CBFree, CallbackW);
782  if (Res != ERROR_SUCCESS) WriteUsageError = Res;
783 
784  WINTRUST_Free(CallbackW);
785  }
786 
787  WINTRUST_Guid2Wstr(psDefUsage->pgActionID, GuidString);
789  if (Res != ERROR_SUCCESS) WriteUsageError = Res;
790 
791  if (WriteUsageError != ERROR_SUCCESS)
792  return FALSE;
793 
794  return TRUE;
795 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
static PWSTR GuidString
Definition: apphelp.c:91
static const WCHAR DefaultId[]
Definition: register.c:82
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
#define CP_ACP
Definition: compat.h:99
static LONG WINTRUST_WriteSingleUsageEntry(LPCSTR OID, const WCHAR *Value, WCHAR *Data)
Definition: register.c:373
static const WCHAR Dll[]
Definition: register.c:83
long LONG
Definition: pedump.c:60
static void WINTRUST_Guid2Wstr(const GUID *pgActionID, WCHAR *GuidString)
Definition: register.c:162
smooth NULL
Definition: ftsmooth.c:416
void WINAPI WINTRUST_Free(void *p)
Definition: wintrust_main.c:56
#define TRACE(s)
Definition: solgame.cpp:4
void *WINAPI WINTRUST_Alloc(DWORD cb)
Definition: wintrust_main.c:45
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
unsigned long DWORD
Definition: ntddk_ex.h:95
#define Len
Definition: deflate.h:82
#define SetLastError(x)
Definition: compat.h:409
#define MultiByteToWideChar
Definition: compat.h:100

Referenced by InitFunctionPtrs(), WINTRUST_RegisterGenVerifyV2(), and WINTRUST_RegisterHttpsProv().

◆ WintrustGetRegPolicyFlags()

void WINAPI WintrustGetRegPolicyFlags ( DWORD )

Definition at line 949 of file wintrust_main.c.

950 {
951  HKEY key;
952  LONG r;
953 
954  TRACE("%p\n", pdwPolicyFlags);
955 
956  *pdwPolicyFlags = 0;
958  KEY_READ, NULL, &key, NULL);
959  if (!r)
960  {
961  DWORD size = sizeof(DWORD);
962 
963  r = RegQueryValueExW(key, State, NULL, NULL, (LPBYTE)pdwPolicyFlags,
964  &size);
965  RegCloseKey(key);
966  if (r)
967  {
968  /* Failed to query, create and return default value */
969  *pdwPolicyFlags = WTPF_IGNOREREVOCATIONONTS |
974  WintrustSetRegPolicyFlags(*pdwPolicyFlags);
975  }
976  }
977 }
#define KEY_READ
Definition: nt_native.h:1023
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define WTPF_IGNOREREVOCATIONONTS
Definition: wintrust.h:445
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define DWORD
Definition: nt_native.h:44
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:1091
#define WTPF_OFFLINEOKNBU_IND
Definition: wintrust.h:442
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
#define WTPF_OFFLINEOKNBU_COM
Definition: wintrust.h:443
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
static const WCHAR Software_Publishing[]
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WTPF_OFFLINEOK_COM
Definition: wintrust.h:441
HKEY key
Definition: reg.c:42
#define WTPF_OFFLINEOK_IND
Definition: wintrust.h:440
BOOL WINAPI WintrustSetRegPolicyFlags(DWORD dwPolicyFlags)
Definition: path.c:42

Referenced by InitFunctionPtrs(), WINTRUST_CertVerify(), and WINTRUST_DefaultVerify().

◆ WintrustLoadFunctionPointers()

BOOL WINAPI WintrustLoadFunctionPointers ( GUID ,
CRYPT_PROVIDER_FUNCTIONS  
)

Definition at line 841 of file register.c.

843 {
844  WCHAR GuidString[39];
845 
846  TRACE("(%s %p)\n", debugstr_guid(pgActionID), pPfns);
847 
848  if (!pPfns) return FALSE;
849  if (!pgActionID)
850  {
852  return FALSE;
853  }
854  if (pPfns->cbStruct != sizeof(CRYPT_PROVIDER_FUNCTIONS)) return FALSE;
855 
856  /* Create this string only once, instead of in the helper function */
857  WINTRUST_Guid2Wstr( pgActionID, GuidString);
858 
859  /* Get the function pointers from the registry, where applicable */
860  pPfns->pfnAlloc = WINTRUST_Alloc;
861  pPfns->pfnFree = WINTRUST_Free;
862  pPfns->pfnAddStore2Chain = WINTRUST_AddStore;
863  pPfns->pfnAddSgnr2Chain = WINTRUST_AddSgnr;
864  pPfns->pfnAddCert2Chain = WINTRUST_AddCert;
865  pPfns->pfnAddPrivData2Chain = WINTRUST_AddPrivData;
866  pPfns->psUIpfns = NULL;
875 
876  return TRUE;
877 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
static PWSTR GuidString
Definition: apphelp.c:91
static const WCHAR Message[]
Definition: register.c:74
#define TRUE
Definition: types.h:120
HRESULT(WINAPI * PFN_PROVIDER_SIGTRUST_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:299
static const WCHAR Certificate[]
Definition: register.c:76
HRESULT(WINAPI * PFN_PROVIDER_OBJTRUST_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:297
static const WCHAR FinalPolicy[]
Definition: register.c:78
BOOL WINAPI WINTRUST_AddSgnr(CRYPT_PROVIDER_DATA *data, BOOL fCounterSigner, DWORD idxSigner, CRYPT_PROVIDER_SGNR *sgnr)
HRESULT(WINAPI * PFN_PROVIDER_TESTFINALPOLICY_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:305
BOOL WINAPI WINTRUST_AddCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner, BOOL fCounterSigner, DWORD idxCounterSigner, PCCERT_CONTEXT pCert2Add)
static const WCHAR CertCheck[]
Definition: register.c:77
static const WCHAR DiagnosticPolicy[]
Definition: register.c:79
static void WINTRUST_Guid2Wstr(const GUID *pgActionID, WCHAR *GuidString)
Definition: register.c:162
HRESULT(WINAPI * PFN_PROVIDER_CLEANUP_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:307
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
void WINAPI WINTRUST_Free(void *p)
Definition: wintrust_main.c:56
static FARPROC WINTRUST_ReadProviderFromReg(WCHAR *GuidString, const WCHAR *FunctionType)
Definition: register.c:797
BOOL(WINAPI * PFN_PROVIDER_CERTCHKPOLICY_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSignerChain, DWORD idxCounterSigner)
Definition: wintrust.h:309
#define TRACE(s)
Definition: solgame.cpp:4
void *WINAPI WINTRUST_Alloc(DWORD cb)
Definition: wintrust_main.c:45
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR Signature[]
Definition: register.c:75
#define SetLastError(x)
Definition: compat.h:409
static const WCHAR Cleanup[]
Definition: register.c:80
HRESULT(WINAPI * PFN_PROVIDER_INIT_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:295
BOOL WINAPI WINTRUST_AddStore(CRYPT_PROVIDER_DATA *data, HCERTSTORE store)
HRESULT(WINAPI * PFN_PROVIDER_CERTTRUST_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:301
static const WCHAR Initialization[]
Definition: register.c:73
BOOL WINAPI WINTRUST_AddPrivData(CRYPT_PROVIDER_DATA *data, CRYPT_PROVIDER_PRIVDATA *pPrivData2Add)
HRESULT(WINAPI * PFN_PROVIDER_FINALPOLICY_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:303

Referenced by InitFunctionPtrs(), test_provider_funcs(), WINTRUST_CertVerify(), and WINTRUST_DefaultVerify().

◆ WintrustRemoveActionID()

BOOL WINAPI WintrustRemoveActionID ( GUID )

Definition at line 337 of file register.c.

338 {
339  WCHAR GuidString[39];
340 
341  TRACE("(%s)\n", debugstr_guid(pgActionID));
342 
343  if (!pgActionID)
344  {
346  return TRUE;
347  }
348 
349  /* Create this string only once, instead of in the helper function */
350  WINTRUST_Guid2Wstr( pgActionID, GuidString);
351 
352  /* We don't care about success or failure */
361 
362  return TRUE;
363 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
static PWSTR GuidString
Definition: apphelp.c:91
static const WCHAR Message[]
Definition: register.c:74
#define TRUE
Definition: types.h:120
static const WCHAR Certificate[]
Definition: register.c:76
static const WCHAR FinalPolicy[]
Definition: register.c:78
static const WCHAR CertCheck[]
Definition: register.c:77
static const WCHAR DiagnosticPolicy[]
Definition: register.c:79
static void WINTRUST_Guid2Wstr(const GUID *pgActionID, WCHAR *GuidString)
Definition: register.c:162
#define debugstr_guid
Definition: kernel32.h:35
static void WINTRUST_RemoveProviderFromReg(WCHAR *GuidString, const WCHAR *FunctionType)
Definition: register.c:304
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR Signature[]
Definition: register.c:75
#define SetLastError(x)
Definition: compat.h:409
static const WCHAR Cleanup[]
Definition: register.c:80
static const WCHAR Initialization[]
Definition: register.c:73

Referenced by DllUnregisterServer(), and InitFunctionPtrs().

◆ WintrustSetRegPolicyFlags()

BOOL WINAPI WintrustSetRegPolicyFlags ( DWORD  )

Definition at line 982 of file wintrust_main.c.

983 {
984  HKEY key;
985  LONG r;
986 
987  TRACE("%x\n", dwPolicyFlags);
988 
990  NULL, 0, KEY_WRITE, NULL, &key, NULL);
991  if (!r)
992  {
993  r = RegSetValueExW(key, State, 0, REG_DWORD, (LPBYTE)&dwPolicyFlags,
994  sizeof(DWORD));
995  RegCloseKey(key);
996  }
997  if (r) SetLastError(r);
998  return r == ERROR_SUCCESS;
999 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define HKEY_CURRENT_USER
Definition: winreg.h:11
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:1091
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
#define KEY_WRITE
Definition: nt_native.h:1031
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:4895
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR Software_Publishing[]
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
HKEY key
Definition: reg.c:42
#define REG_DWORD
Definition: sdbapi.c:596
Definition: path.c:42

Referenced by InitFunctionPtrs(), and WintrustGetRegPolicyFlags().

◆ WinVerifyTrust()

LONG WINAPI WinVerifyTrust ( HWND  ,
GUID ,
LPVOID   
)

Definition at line 687 of file wintrust_main.c.

688 {
689  static const GUID unknown = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47,
690  0x00,0xC0,0x4F,0xC2,0x95,0xEE } };
691  static const GUID published_software = WIN_SPUB_ACTION_PUBLISHED_SOFTWARE;
692  static const GUID generic_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2;
693  static const GUID generic_cert_verify = WINTRUST_ACTION_GENERIC_CERT_VERIFY;
694  static const GUID generic_chain_verify = WINTRUST_ACTION_GENERIC_CHAIN_VERIFY;
695  static const GUID cert_action_verify = CERT_CERTIFICATE_ACTION_VERIFY;
697  WINTRUST_DATA *actionData = ActionData;
698 
699  TRACE("(%p, %s, %p)\n", hwnd, debugstr_guid(ActionID), ActionData);
700  dump_wintrust_data(ActionData);
701 
702  /* Support for known old-style callers: */
703  if (IsEqualGUID(ActionID, &published_software))
704  err = WINTRUST_PublishedSoftware(hwnd, ActionID, ActionData);
705  else if (IsEqualGUID(ActionID, &cert_action_verify))
706  err = WINTRUST_CertActionVerify(hwnd, ActionID, ActionData);
707  else
708  {
709  DWORD stateAction;
710 
711  /* Check known actions to warn of possible problems */
712  if (!IsEqualGUID(ActionID, &unknown) &&
713  !IsEqualGUID(ActionID, &generic_verify_v2) &&
714  !IsEqualGUID(ActionID, &generic_cert_verify) &&
715  !IsEqualGUID(ActionID, &generic_chain_verify))
716  WARN("unknown action %s, default behavior may not be right\n",
717  debugstr_guid(ActionID));
718  if (WVT_ISINSTRUCT(WINTRUST_DATA, actionData->cbStruct, dwStateAction))
719  stateAction = actionData->dwStateAction;
720  else
721  {
722  TRACE("no dwStateAction, assuming WTD_STATEACTION_IGNORE\n");
723  stateAction = WTD_STATEACTION_IGNORE;
724  }
725  switch (stateAction)
726  {
728  err = WINTRUST_DefaultVerifyAndClose(hwnd, ActionID, ActionData);
729  break;
731  err = WINTRUST_DefaultVerify(hwnd, ActionID, ActionData);
732  break;
734  err = WINTRUST_DefaultClose(hwnd, ActionID, ActionData);
735  break;
736  default:
737  FIXME("unimplemented for %d\n", actionData->dwStateAction);
738  }
739  }
740 
741  TRACE("returning %08x\n", err);
742  return err;
743 }
#define WTD_STATEACTION_VERIFY
Definition: wintrust.h:123
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define ERROR_SUCCESS
Definition: deptool.c:10
static LONG WINTRUST_PublishedSoftware(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
DWORD cbStruct
Definition: wintrust.h:99
#define WARN(fmt,...)
Definition: debug.h:111
#define WIN_SPUB_ACTION_PUBLISHED_SOFTWARE
Definition: wintrust.h:661
static LONG WINTRUST_DefaultVerifyAndClose(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
#define WINTRUST_ACTION_GENERIC_VERIFY_V2
Definition: softpub.h:108
long LONG
Definition: pedump.c:60
static LONG WINTRUST_CertActionVerify(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
#define FIXME(fmt,...)
Definition: debug.h:110
DWORD dwStateAction
Definition: wintrust.h:114
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static LONG WINTRUST_DefaultVerify(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: id3.c:18
#define CERT_CERTIFICATE_ACTION_VERIFY
Definition: cryptdlg.h:236
#define WINTRUST_ACTION_GENERIC_CERT_VERIFY
Definition: softpub.h:24
#define err(...)
#define WVT_ISINSTRUCT(t, s, f)
Definition: wintrust.h:433
#define WTD_STATEACTION_CLOSE
Definition: wintrust.h:124
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static LONG WINTRUST_DefaultClose(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
static void dump_wintrust_data(WINTRUST_DATA *data)
#define WINTRUST_ACTION_GENERIC_CHAIN_VERIFY
Definition: softpub.h:37
#define WTD_STATEACTION_IGNORE
Definition: wintrust.h:122

Referenced by call_winverify(), CertViewPropertiesW(), CryptUIDlgViewCertificateW(), test_wintrust(), and WinVerifyTrustEx().

◆ WinVerifyTrustEx()

HRESULT WINAPI WinVerifyTrustEx ( HWND  ,
GUID ,
WINTRUST_DATA  
)

Definition at line 748 of file wintrust_main.c.

750 {
751  return WinVerifyTrust(hwnd, ActionID, ActionData);
752 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
LONG WINAPI WinVerifyTrust(HWND hwnd, GUID *ActionID, LPVOID ActionData)

Referenced by MsiGetFileSignatureInformationW(), and test_wintrust().

◆ WTHelperGetProvCertFromChain()

CRYPT_PROVIDER_CERT* WINAPI WTHelperGetProvCertFromChain ( CRYPT_PROVIDER_SGNR pSgnr,
DWORD  idxCert 
)

Definition at line 783 of file wintrust_main.c.

785 {
787 
788  TRACE("(%p %d)\n", pSgnr, idxCert);
789 
790  if (!pSgnr || idxCert >= pSgnr->csCertChain || !pSgnr->pasCertChain)
791  return NULL;
792  cert = &pSgnr->pasCertChain[idxCert];
793  TRACE("returning %p\n", cert);
794  return cert;
795 }
smooth NULL
Definition: ftsmooth.c:416
static BYTE cert[]
Definition: msg.c:1437
#define TRACE(s)
Definition: solgame.cpp:4
CRYPT_PROVIDER_CERT * pasCertChain
Definition: wintrust.h:235

Referenced by CRYPTDLG_CopyChain(), CryptUIDlgViewCertificateW(), MsiGetFileSignatureInformationW(), and set_certificate_status_for_end_cert().

◆ WTHelperGetProvPrivateDataFromChain()

CRYPT_PROVIDER_PRIVDATA* WINAPI WTHelperGetProvPrivateDataFromChain ( CRYPT_PROVIDER_DATA ,
GUID  
)

Definition at line 797 of file wintrust_main.c.

800 {
801  CRYPT_PROVIDER_PRIVDATA *privdata = NULL;
802  DWORD i;
803 
804  TRACE("(%p, %s)\n", pProvData, debugstr_guid(pgProviderID));
805 
806  for (i = 0; i < pProvData->csProvPrivData; i++)
807  if (IsEqualGUID(pgProviderID, &pProvData->pasProvPrivData[i].gProviderID))
808  {
809  privdata = &pProvData->pasProvPrivData[i];
810  break;
811  }
812 
813  return privdata;
814 }
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
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ WTHelperGetProvSignerFromChain()

CRYPT_PROVIDER_SGNR* WINAPI WTHelperGetProvSignerFromChain ( CRYPT_PROVIDER_DATA pProvData,
DWORD  idxSigner,
BOOL  fCounterSigner,
DWORD  idxCounterSigner 
)

Definition at line 757 of file wintrust_main.c.

760 {
761  CRYPT_PROVIDER_SGNR *sgnr;
762 
763  TRACE("(%p %d %d %d)\n", pProvData, idxSigner, fCounterSigner,
764  idxCounterSigner);
765 
766  if (idxSigner >= pProvData->csSigners || !pProvData->pasSigners)
767  return NULL;
768  sgnr = &pProvData->pasSigners[idxSigner];
769  if (fCounterSigner)
770  {
771  if (idxCounterSigner >= sgnr->csCounterSigners ||
772  !sgnr->pasCounterSigners)
773  return NULL;
774  sgnr = &sgnr->pasCounterSigners[idxCounterSigner];
775  }
776  TRACE("returning %p\n", sgnr);
777  return sgnr;
778 }
CRYPT_PROVIDER_SGNR * pasSigners
Definition: wintrust.h:364
smooth NULL
Definition: ftsmooth.c:416
struct _CRYPT_PROVIDER_SGNR * pasCounterSigners
Definition: wintrust.h:240
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by CRYPTDLG_CopyChain(), CryptUIDlgViewCertificateW(), hierarchy_dlg_proc(), index_to_lparam(), lparam_to_index(), MsiGetFileSignatureInformationW(), set_cert_info(), set_certificate_status_for_end_cert(), show_cert_chain(), and show_dialog_for_selected_cert().

◆ WTHelperProvDataFromStateData()

CRYPT_PROVIDER_DATA* WINAPI WTHelperProvDataFromStateData ( HANDLE  hStateData)

Definition at line 819 of file wintrust_main.c.

820 {
821  TRACE("%p\n", hStateData);
822  return hStateData;
823 }
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by CryptUIDlgViewCertificateW().

Variable Documentation

◆ WT_PROVIDER_CERTTRUST_FUNCTION

const WCHAR WT_PROVIDER_CERTTRUST_FUNCTION[]
static
Initial value:
=
{'W','i','n','t','r','u','s','t','C','e','r','t','i','f','i','c','a','t','e','T','r','u','s','t', 0}

Definition at line 460 of file wintrust.h.

Referenced by WINTRUST_InitRegStructs().