ReactOS  0.4.11-dev-195-gef016bf
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_ENTRY
PCRYPT_TRUST_REG_ENTRY
 
typedef struct
_CRYPT_REGISTER_ACTIONID 
CRYPT_REGISTER_ACTIONID
 
typedef struct
_CRYPT_REGISTER_ACTIONID
PCRYPT_REGISTER_ACTIONID
 
typedef struct
_CRYPT_PROVIDER_REGDEFUSAGE 
CRYPT_PROVIDER_REGDEFUSAGE
 
typedef struct
_CRYPT_PROVIDER_REGDEFUSAGE
PCRYPT_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_CERT
PCRYPT_PROVIDER_CERT
 
typedef struct _CRYPT_PROVIDER_SGNR CRYPT_PROVIDER_SGNR
 
typedef struct
_CRYPT_PROVIDER_SGNR
PCRYPT_PROVIDER_SGNR
 
typedef struct
_CRYPT_PROVIDER_PRIVDATA 
CRYPT_PROVIDER_PRIVDATA
 
typedef struct
_CRYPT_PROVIDER_PRIVDATA
PCRYPT_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_FUNCTIONS
PCRYPT_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_DATA
PCRYPT_PROVIDER_DATA
 
typedef struct
_CRYPT_PROVIDER_SIGSTATE 
CRYPT_PROVIDER_SIGSTATE
 
typedef struct
_CRYPT_PROVIDER_SIGSTATE
PCRYPT_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_FUNCS
PCRYPT_PROVUI_FUNCS
 
typedef BYTE SPC_UUID [SPC_UUID_LENGTH]
 
typedef struct
_SPC_SERIALIZED_OBJECT 
SPC_SERIALIZED_OBJECT
 
typedef struct
_SPC_SERIALIZED_OBJECT
PSPC_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_CONTENT
PSPC_INDIRECT_DATA_CONTENT
 
typedef struct
_SPC_FINANCIAL_CRITERIA 
SPC_FINANCIAL_CRITERIA
 
typedef struct
_SPC_FINANCIAL_CRITERIA
PSPC_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_INFO
PSPC_SP_AGENCY_INFO
 
typedef struct _SPC_STATEMENT_TYPE SPC_STATEMENT_TYPE
 
typedef struct
_SPC_STATEMENT_TYPE
PSPC_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_SUBJECT
LPWIN_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_ONLY
LPWIN_TRUST_ACTDATA_CONTEXT_SUBJECT_ONLY
 
typedef struct
_WIN_TRUST_SUBJECT_FILE 
WIN_TRUST_SUBJECT_FILE
 
typedef struct
_WIN_TRUST_SUBJECT_FILE
LPWIN_TRUST_SUBJECT_FILE
 
typedef struct
_WIN_TRUST_SUBJECT_FILE_AND_DISPLAY 
WIN_TRUST_SUBJECT_FILE_AND_DISPLAY
 
typedef struct
_WIN_TRUST_SUBJECT_FILE_AND_DISPLAY
LPWIN_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

#define CAT_MEMBERINFO_OBJID   "1.3.6.1.4.1.311.12.2.2"

Definition at line 499 of file wintrust.h.

Referenced by CryptCATEnumerateMember(), and DllRegisterServer().

#define CAT_MEMBERINFO_STRUCT   ((LPCSTR) 2222)
#define CAT_NAMEVALUE_OBJID   "1.3.6.1.4.1.311.12.2.1"

Definition at line 498 of file wintrust.h.

Referenced by DllRegisterServer().

#define CAT_NAMEVALUE_STRUCT   ((LPCSTR) 2221)

Definition at line 512 of file wintrust.h.

Referenced by DllRegisterServer(), test_decodeCatNameValue(), and test_encodeCatNameValue().

#define CERT_CONFIDENCE_AUTHIDEXT   0x00010000

Definition at line 227 of file wintrust.h.

#define CERT_CONFIDENCE_HIGHEST   0x11111000

Definition at line 229 of file wintrust.h.

#define CERT_CONFIDENCE_HYGIENE   0x00001000

Definition at line 228 of file wintrust.h.

#define CERT_CONFIDENCE_SIG   0x10000000
#define CERT_CONFIDENCE_TIME   0x01000000
#define CERT_CONFIDENCE_TIMENEST   0x00100000
#define CPD_CHOICE_SIP   1

Definition at line 384 of file wintrust.h.

#define CPD_REVOCATION_CHECK_CHAIN   0x00040000

Definition at line 389 of file wintrust.h.

Referenced by WINTRUST_CreateChainPolicyCreateInfo().

#define CPD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT   0x00080000

Definition at line 390 of file wintrust.h.

Referenced by WINTRUST_CreateChainPolicyCreateInfo().

#define CPD_REVOCATION_CHECK_END_CERT   0x00020000

Definition at line 388 of file wintrust.h.

Referenced by WINTRUST_CreateChainPolicyCreateInfo().

#define CPD_REVOCATION_CHECK_NONE   0x00010000

Definition at line 387 of file wintrust.h.

#define CPD_UISTATE_MODE_ALLOW   0x00000002

Definition at line 394 of file wintrust.h.

#define CPD_UISTATE_MODE_BLOCK   0x00000001

Definition at line 393 of file wintrust.h.

#define CPD_UISTATE_MODE_MASK   0x00000003

Definition at line 395 of file wintrust.h.

#define CPD_UISTATE_MODE_PROMPT   0x00000000

Definition at line 392 of file wintrust.h.

#define CPD_USE_NT5_CHAIN_FLAG   0x80000000

Definition at line 386 of file wintrust.h.

#define SGNR_TYPE_TIMESTAMP   0x00000010

Definition at line 244 of file wintrust.h.

#define SPC_CAB_DATA_OBJID   "1.3.6.1.4.1.311.2.1.25"

Definition at line 492 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_CAB_DATA_STRUCT   ((LPCSTR) 2008)

Definition at line 509 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_CERT_EXTENSIONS_OBJID   "1.3.6.1.4.1.311.2.1.14"

Definition at line 485 of file wintrust.h.

#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.

#define SPC_FINANCIAL_CRITERIA_OBJID   "1.3.6.1.4.1.311.2.1.27"

Definition at line 495 of file wintrust.h.

Referenced by CRYPT_GetBuiltinFormatFunction(), and DllRegisterServer().

#define SPC_GLUE_RDN_OBJID   "1.3.6.1.4.1.311.2.1.25"

Definition at line 493 of file wintrust.h.

#define SPC_INDIRECT_DATA_CONTENT_STRUCT   ((LPCSTR) 2003)

Definition at line 504 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_INDIRECT_DATA_OBJID   "1.3.6.1.4.1.311.2.1.4"

Definition at line 481 of file wintrust.h.

Referenced by CryptCATEnumerateMember(), and DllRegisterServer().

#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.

#define SPC_JAVA_CLASS_DATA_OBJID   "1.3.6.1.4.1.311.2.1.20"

Definition at line 489 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_JAVA_CLASS_DATA_STRUCT   ((LPCSTR) 2009)

Definition at line 510 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_LINK_OBJID   "1.3.6.1.4.1.311.2.1.28"

Definition at line 496 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_LINK_STRUCT   ((LPCSTR) 2005)

Definition at line 506 of file wintrust.h.

Referenced by DllRegisterServer(), test_decodeSPCLink(), and test_encodeSPCLink().

#define SPC_MINIMAL_CRITERIA_OBJID   "1.3.6.1.4.1.311.2.1.26"

Definition at line 494 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_MINIMAL_CRITERIA_STRUCT   ((LPCSTR) 2001)

Definition at line 502 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_PE_IMAGE_DATA_OBJID   "1.3.6.1.4.1.311.2.1.15"
#define SPC_PE_IMAGE_DATA_STRUCT   ((LPCSTR) 2004)

Definition at line 505 of file wintrust.h.

Referenced by DllRegisterServer(), test_decodeSPCPEImage(), and test_encodeSPCPEImage().

#define SPC_RAW_FILE_DATA_OBJID   "1.3.6.1.4.1.311.2.1.18"

Definition at line 487 of file wintrust.h.

#define SPC_SIGINFO_OBJID   "1.3.6.1.4.1.311.2.1.30"

Definition at line 497 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_SIGINFO_STRUCT   ((LPCSTR) 2130)

Definition at line 511 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_SP_AGENCY_INFO_OBJID   "1.3.6.1.4.1.311.2.1.10"

Definition at line 482 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_SP_AGENCY_INFO_STRUCT   ((LPCSTR) 2000)

Definition at line 501 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_SP_OPUS_INFO_OBJID   "1.3.6.1.4.1.311.2.1.12"

Definition at line 484 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_SP_OPUS_INFO_STRUCT   ((LPCSTR) 2007)

Definition at line 508 of file wintrust.h.

Referenced by DllRegisterServer(), test_decodeSpOpusInfo(), and test_encodeSpOpusInfo().

#define SPC_STATEMENT_TYPE_OBJID   "1.3.6.1.4.1.311.2.1.11"

Definition at line 483 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_STATEMENT_TYPE_STRUCT   ((LPCSTR) 2006)

Definition at line 507 of file wintrust.h.

Referenced by DllRegisterServer().

#define SPC_STRUCTURED_STORAGE_DATA_OBJID   "1.3.6.1.4.1.311.2.1.19"

Definition at line 488 of file wintrust.h.

#define SPC_UUID_LENGTH   16

Definition at line 515 of file wintrust.h.

#define TRUSTERROR_MAX_STEPS   38
#define TRUSTERROR_STEP_CATALOGFILE   6

Definition at line 259 of file wintrust.h.

#define TRUSTERROR_STEP_CERTSTORE   7

Definition at line 260 of file wintrust.h.

#define TRUSTERROR_STEP_FILEIO   2

Definition at line 256 of file wintrust.h.

#define TRUSTERROR_STEP_FINAL_CERTCHKPROV   35

Definition at line 278 of file wintrust.h.

#define TRUSTERROR_STEP_FINAL_CERTPROV   34
#define TRUSTERROR_STEP_FINAL_INITPROV   31

Definition at line 274 of file wintrust.h.

#define TRUSTERROR_STEP_FINAL_OBJPROV   32
#define TRUSTERROR_STEP_FINAL_POLICYPROV   36
#define TRUSTERROR_STEP_FINAL_SIGPROV   33

Definition at line 276 of file wintrust.h.

Referenced by SoftpubLoadSignature(), and WINTRUST_AddTrustStepsFromFunctions().

#define TRUSTERROR_STEP_FINAL_UIPROV   37

Definition at line 280 of file wintrust.h.

#define TRUSTERROR_STEP_FINAL_WVTINIT   30
#define TRUSTERROR_STEP_MESSAGE   8

Definition at line 261 of file wintrust.h.

#define TRUSTERROR_STEP_MSG_CERTCHAIN   15

Definition at line 268 of file wintrust.h.

#define TRUSTERROR_STEP_MSG_COUNTERSIGCERT   17

Definition at line 270 of file wintrust.h.

#define TRUSTERROR_STEP_MSG_COUNTERSIGINFO   16

Definition at line 269 of file wintrust.h.

#define TRUSTERROR_STEP_MSG_INNERCNT   11

Definition at line 264 of file wintrust.h.

#define TRUSTERROR_STEP_MSG_INNERCNTTYPE   10

Definition at line 263 of file wintrust.h.

#define TRUSTERROR_STEP_MSG_SIGNERCERT   14

Definition at line 267 of file wintrust.h.

#define TRUSTERROR_STEP_MSG_SIGNERCOUNT   9

Definition at line 262 of file wintrust.h.

#define TRUSTERROR_STEP_MSG_SIGNERINFO   13

Definition at line 266 of file wintrust.h.

#define TRUSTERROR_STEP_MSG_STORE   12

Definition at line 265 of file wintrust.h.

#define TRUSTERROR_STEP_SIP   3

Definition at line 257 of file wintrust.h.

#define TRUSTERROR_STEP_SIPSUBJINFO   5

Definition at line 258 of file wintrust.h.

#define TRUSTERROR_STEP_VERIFY_MSGHASH   18

Definition at line 271 of file wintrust.h.

#define TRUSTERROR_STEP_VERIFY_MSGINDIRECTDATA   19

Definition at line 272 of file wintrust.h.

#define TRUSTERROR_STEP_WVTPARAMS   0

Definition at line 255 of file wintrust.h.

#define WIN_CERT_REVISION_1_0   0x0100

Definition at line 623 of file wintrust.h.

Referenced by test_add_certificate().

#define WIN_CERT_REVISION_2_0   0x0200

Definition at line 624 of file wintrust.h.

Referenced by WINTRUST_PutSignedMsgToPEFile().

#define WIN_CERT_TYPE_PKCS_SIGNED_DATA   0x0002 /* PKCS SignedData */

Definition at line 627 of file wintrust.h.

#define WIN_CERT_TYPE_RESERVED_1   0x0003 /* Reserved */

Definition at line 628 of file wintrust.h.

#define WIN_CERT_TYPE_TS_STACK_SIGNED   0x0004

Definition at line 629 of file wintrust.h.

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

Definition at line 626 of file wintrust.h.

Referenced by WINTRUST_GetSignedMsgFromPEFile().

#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.

Referenced by WINTRUST_RegisterPublishedSoftware(), and WinVerifyTrust().

#define WSS_CERTTRUST_SUPPORT   0x00000004

Definition at line 416 of file wintrust.h.

#define WSS_GET_SECONDARY_SIG_COUNT   0x00000002

Definition at line 156 of file wintrust.h.

#define WSS_INPUT_FLAG_MASK   0x00000007

Definition at line 158 of file wintrust.h.

#define WSS_OBJTRUST_SUPPORT   0x00000001

Definition at line 414 of file wintrust.h.

#define WSS_OUT_FILE_SUPPORTS_SEAL   0x20000000

Definition at line 162 of file wintrust.h.

#define WSS_OUT_HAS_SEALING_INTENT   0x40000000

Definition at line 161 of file wintrust.h.

#define WSS_OUT_SEALING_STATUS_VERIFIED   0x80000000

Definition at line 160 of file wintrust.h.

#define WSS_OUTPUT_FLAG_MASK   0xe0000000

Definition at line 163 of file wintrust.h.

#define WSS_SIGTRUST_SUPPORT   0x00000002

Definition at line 415 of file wintrust.h.

#define WSS_VERIFY_SEALING   0x00000004

Definition at line 157 of file wintrust.h.

#define WSS_VERIFY_SPECIFIC   0x00000001

Definition at line 155 of file wintrust.h.

#define WT_ADD_ACTION_ID_RET_RESULT_FLAG   1

Definition at line 448 of file wintrust.h.

Referenced by DllRegisterServer(), and WintrustAddActionID().

#define WTCI_DONT_OPEN_STORES   0x00000001

Definition at line 79 of file wintrust.h.

#define WTCI_OPEN_ONLY_ROOT   0x00000002

Definition at line 80 of file wintrust.h.

#define WTD_CACHE_ONLY_URL_RETRIEVAL   0x00001000

Definition at line 140 of file wintrust.h.

#define WTD_CHOICE_BLOB   3
#define WTD_CHOICE_CATALOG   2

Definition at line 92 of file wintrust.h.

Referenced by dump_wintrust_data(), and SoftpubLoadMessage().

#define WTD_CHOICE_CERT   5
#define WTD_CHOICE_SIGNER   4

Definition at line 94 of file wintrust.h.

Referenced by dump_wintrust_data().

#define WTD_HASH_ONLY_FLAG   0x00000200

Definition at line 137 of file wintrust.h.

Referenced by call_winverify().

#define WTD_LIFETIME_SIGNING_FLAG   0x00000800

Definition at line 139 of file wintrust.h.

#define WTD_NO_IE4_CHAIN_FLAG   0x00000002

Definition at line 130 of file wintrust.h.

#define WTD_NO_POLICY_USAGE_FLAG   0x00000004

Definition at line 131 of file wintrust.h.

#define WTD_PROV_FLAGS_MASK   0x0000ffff

Definition at line 128 of file wintrust.h.

#define WTD_REVOCATION_CHECK_CHAIN   0x00000040

Definition at line 134 of file wintrust.h.

Referenced by CryptUIDlgViewCertificateW().

#define WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT   0x00000080

Definition at line 135 of file wintrust.h.

Referenced by CryptUIDlgViewCertificateW().

#define WTD_REVOCATION_CHECK_END_CERT   0x00000020

Definition at line 133 of file wintrust.h.

Referenced by CryptUIDlgViewCertificateW().

#define WTD_REVOCATION_CHECK_NONE   0x00000010

Definition at line 132 of file wintrust.h.

#define WTD_REVOKE_NONE   0

Definition at line 88 of file wintrust.h.

Referenced by call_winverify().

#define WTD_REVOKE_WHOLECHAIN   1

Definition at line 89 of file wintrust.h.

Referenced by MsiGetFileSignatureInformationW(), and test_wintrust().

#define WTD_SAFER_FLAG   0x00000100

Definition at line 136 of file wintrust.h.

#define WTD_STATEACTION_AUTO_CACHE   3

Definition at line 125 of file wintrust.h.

#define WTD_STATEACTION_AUTO_CACHE_FLUSH   4

Definition at line 126 of file wintrust.h.

#define WTD_STATEACTION_IGNORE   0

Definition at line 122 of file wintrust.h.

Referenced by WINTRUST_CertActionVerify(), and WinVerifyTrust().

#define WTD_UI_ALL   1

Definition at line 83 of file wintrust.h.

#define WTD_UI_NOBAD   3

Definition at line 85 of file wintrust.h.

#define WTD_UI_NOGOOD   4

Definition at line 86 of file wintrust.h.

#define WTD_UICONTEXT_EXECUTE   0

Definition at line 142 of file wintrust.h.

#define WTD_UICONTEXT_INSTALL   1

Definition at line 143 of file wintrust.h.

Referenced by MsiGetFileSignatureInformationW().

#define WTD_USE_DEFAULT_OSVER_CHECK   0x00000400

Definition at line 138 of file wintrust.h.

#define WTD_USE_IE4_TRUST_FLAG   0x00000001

Definition at line 129 of file wintrust.h.

#define WTPF_ALLOWONLYPERTRUST   0x00040000

Definition at line 446 of file wintrust.h.

#define WTPF_IGNOREEXPIRATION   0x00000100

Definition at line 438 of file wintrust.h.

Referenced by SoftpubAuthenticode(), and WINTRUST_DefaultPolicy().

#define WTPF_IGNOREREVOCATIONONTS   0x00020000

Definition at line 445 of file wintrust.h.

Referenced by WintrustGetRegPolicyFlags().

#define WTPF_IGNOREREVOKATION   0x00000200

Definition at line 439 of file wintrust.h.

Referenced by SoftpubAuthenticode(), and WINTRUST_DefaultPolicy().

#define WTPF_OFFLINEOK_COM   0x00000800

Definition at line 441 of file wintrust.h.

Referenced by WintrustGetRegPolicyFlags().

#define WTPF_OFFLINEOK_IND   0x00000400

Definition at line 440 of file wintrust.h.

Referenced by WintrustGetRegPolicyFlags().

#define WTPF_OFFLINEOKNBU_COM   0x00002000

Definition at line 443 of file wintrust.h.

Referenced by WintrustGetRegPolicyFlags().

#define WTPF_OFFLINEOKNBU_IND   0x00001000

Definition at line 442 of file wintrust.h.

Referenced by WintrustGetRegPolicyFlags().

#define WTPF_TESTCANBEVALID   0x00000080

Definition at line 437 of file wintrust.h.

Referenced by SoftpubAuthenticode().

#define WTPF_TRUSTTEST   0x00000020

Definition at line 436 of file wintrust.h.

Referenced by SoftpubAuthenticode().

#define WTPF_VERIFY_V1_OFF   0x00010000

Definition at line 444 of file wintrust.h.

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

Definition at line 434 of file wintrust.h.

Referenced by SOFTPUB_LoadCertMessage(), and WINTRUST_CertVerifyObjTrust().

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

Definition at line 432 of file wintrust.h.

Typedef Documentation

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

Definition at line 284 of file wintrust.h.

Definition at line 36 of file integrity.c.

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.

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.

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.

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

Definition at line 286 of file wintrust.h.

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

Definition at line 285 of file wintrust.h.

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.

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

Definition at line 301 of file wintrust.h.

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

Definition at line 307 of file wintrust.h.

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

Definition at line 303 of file wintrust.h.

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

Definition at line 295 of file wintrust.h.

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

Definition at line 297 of file wintrust.h.

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

Definition at line 299 of file wintrust.h.

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

Definition at line 305 of file wintrust.h.

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

Definition at line 418 of file wintrust.h.

typedef BYTE SPC_UUID[SPC_UUID_LENGTH]

Definition at line 516 of file wintrust.h.

Definition at line 631 of file wintrust.h.

Function Documentation

BOOL WINAPI WintrustAddActionID ( GUID ,
DWORD  ,
CRYPT_REGISTER_ACTIONID  
)

Definition at line 238 of file register.c.

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

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
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR Certificate[]
Definition: register.c:76
static const WCHAR FinalPolicy[]
Definition: register.c:78
static const WCHAR CertCheck[]
Definition: register.c:77
#define FALSE
Definition: types.h:117
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
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
BOOL WINAPI WintrustAddDefaultForUsage ( const char ,
CRYPT_PROVIDER_REGDEFUSAGE  
)

Definition at line 733 of file register.c.

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

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);
788  Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, DefaultId, 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
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define CP_ACP
Definition: compat.h:99
static LONG WINTRUST_WriteSingleUsageEntry(LPCSTR OID, const WCHAR *Value, WCHAR *Data)
Definition: register.c:373
DWORD DWORD
Definition: winlogon.h:84
static const WCHAR Dll[]
Definition: register.c:83
#define FALSE
Definition: types.h:117
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
#define debugstr_a
Definition: kernel32.h:31
#define Len
Definition: deflate.h:82
#define SetLastError(x)
Definition: compat.h:409
#define MultiByteToWideChar
Definition: compat.h:100
void WINAPI WintrustGetRegPolicyFlags ( DWORD )

Definition at line 949 of file wintrust_main.c.

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

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
unsigned char * LPBYTE
Definition: typedefs.h:52
#define DWORD
Definition: msvc.h:34
DWORD DWORD
Definition: winlogon.h:84
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:1094
#define WTPF_OFFLINEOKNBU_IND
Definition: wintrust.h:442
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
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:4134
HANDLE HKEY
Definition: registry.h:24
static const WCHAR Software_Publishing[]
#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)
BOOL WINAPI WintrustLoadFunctionPointers ( GUID ,
CRYPT_PROVIDER_FUNCTIONS  
)

Definition at line 841 of file register.c.

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

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;
867  pPfns->pfnInitialize = (PFN_PROVIDER_INIT_CALL)WINTRUST_ReadProviderFromReg(GuidString, Initialization);
868  pPfns->pfnObjectTrust = (PFN_PROVIDER_OBJTRUST_CALL)WINTRUST_ReadProviderFromReg(GuidString, Message);
869  pPfns->pfnSignatureTrust = (PFN_PROVIDER_SIGTRUST_CALL)WINTRUST_ReadProviderFromReg(GuidString, Signature);
870  pPfns->pfnCertificateTrust = (PFN_PROVIDER_CERTTRUST_CALL)WINTRUST_ReadProviderFromReg(GuidString, Certificate);
871  pPfns->pfnCertCheckPolicy = (PFN_PROVIDER_CERTCHKPOLICY_CALL)WINTRUST_ReadProviderFromReg(GuidString, CertCheck);
872  pPfns->pfnFinalPolicy = (PFN_PROVIDER_FINALPOLICY_CALL)WINTRUST_ReadProviderFromReg(GuidString, FinalPolicy);
873  pPfns->pfnTestFinalPolicy = (PFN_PROVIDER_TESTFINALPOLICY_CALL)WINTRUST_ReadProviderFromReg(GuidString, DiagnosticPolicy);
874  pPfns->pfnCleanupPolicy = (PFN_PROVIDER_CLEANUP_CALL)WINTRUST_ReadProviderFromReg(GuidString, Cleanup);
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
__wchar_t WCHAR
Definition: xmlstorage.h:180
HRESULT(WINAPI * PFN_PROVIDER_FINALPOLICY_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:303
static const WCHAR Certificate[]
Definition: register.c:76
HRESULT(WINAPI * PFN_PROVIDER_TESTFINALPOLICY_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:305
static const WCHAR FinalPolicy[]
Definition: register.c:78
HRESULT(WINAPI * PFN_PROVIDER_CERTTRUST_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:301
BOOL WINAPI WINTRUST_AddSgnr(CRYPT_PROVIDER_DATA *data, BOOL fCounterSigner, DWORD idxSigner, CRYPT_PROVIDER_SGNR *sgnr)
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
#define FALSE
Definition: types.h:117
static const WCHAR DiagnosticPolicy[]
Definition: register.c:79
static void WINTRUST_Guid2Wstr(const GUID *pgActionID, WCHAR *GuidString)
Definition: register.c:162
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
#define TRACE(s)
Definition: solgame.cpp:4
void *WINAPI WINTRUST_Alloc(DWORD cb)
Definition: wintrust_main.c:45
HRESULT(WINAPI * PFN_PROVIDER_INIT_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:295
static const WCHAR Signature[]
Definition: register.c:75
HRESULT(WINAPI * PFN_PROVIDER_CLEANUP_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:307
#define SetLastError(x)
Definition: compat.h:409
static const WCHAR Cleanup[]
Definition: register.c:80
BOOL WINAPI WINTRUST_AddStore(CRYPT_PROVIDER_DATA *data, HCERTSTORE store)
BOOL(WINAPI * PFN_PROVIDER_CERTCHKPOLICY_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSignerChain, DWORD idxCounterSigner)
Definition: wintrust.h:309
static const WCHAR Initialization[]
Definition: register.c:73
BOOL WINAPI WINTRUST_AddPrivData(CRYPT_PROVIDER_DATA *data, CRYPT_PROVIDER_PRIVDATA *pPrivData2Add)
HRESULT(WINAPI * PFN_PROVIDER_OBJTRUST_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:297
HRESULT(WINAPI * PFN_PROVIDER_SIGTRUST_CALL)(struct _CRYPT_PROVIDER_DATA *pProvData)
Definition: wintrust.h:299
BOOL WINAPI WintrustRemoveActionID ( GUID )

Definition at line 337 of file register.c.

Referenced by DllUnregisterServer(), and InitFunctionPtrs().

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
__wchar_t WCHAR
Definition: xmlstorage.h:180
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
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
BOOL WINAPI WintrustSetRegPolicyFlags ( DWORD  )

Definition at line 982 of file wintrust_main.c.

Referenced by InitFunctionPtrs(), and WintrustGetRegPolicyFlags().

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
unsigned char * LPBYTE
Definition: typedefs.h:52
DWORD DWORD
Definition: winlogon.h:84
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:1094
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
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:4917
#define TRACE(s)
Definition: solgame.cpp:4
HANDLE HKEY
Definition: registry.h:24
static const WCHAR Software_Publishing[]
#define SetLastError(x)
Definition: compat.h:409
HKEY key
Definition: reg.c:42
#define REG_DWORD
Definition: sdbapi.c:539
LONG WINAPI WinVerifyTrust ( HWND  ,
GUID ,
LPVOID   
)

Definition at line 687 of file wintrust_main.c.

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

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
DWORD DWORD
Definition: winlogon.h:84
static LONG WINTRUST_DefaultVerifyAndClose(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
#define WINTRUST_ACTION_GENERIC_VERIFY_V2
Definition: softpub.h:108
int int int * err
Definition: fci.h:172
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)
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:4024
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
HRESULT WINAPI WinVerifyTrustEx ( HWND  ,
GUID ,
WINTRUST_DATA  
)

Definition at line 748 of file wintrust_main.c.

Referenced by MsiGetFileSignatureInformationW(), and test_wintrust().

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)
CRYPT_PROVIDER_CERT* WINAPI WTHelperGetProvCertFromChain ( CRYPT_PROVIDER_SGNR pSgnr,
DWORD  idxCert 
)

Definition at line 783 of file wintrust_main.c.

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

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
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 }
DWORD DWORD
Definition: winlogon.h:84
GLenum GLclampf GLint i
Definition: glfuncs.h:14
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4024
CRYPT_PROVIDER_SGNR* WINAPI WTHelperGetProvSignerFromChain ( CRYPT_PROVIDER_DATA pProvData,
DWORD  idxSigner,
BOOL  fCounterSigner,
DWORD  idxCounterSigner 
)

Definition at line 757 of file wintrust_main.c.

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().

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
CRYPT_PROVIDER_DATA* WINAPI WTHelperProvDataFromStateData ( HANDLE  hStateData)

Definition at line 819 of file wintrust_main.c.

Referenced by CryptUIDlgViewCertificateW().

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

Variable Documentation

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().