22#define NONAMELESSUNION
70 cert->pCertInfo->cExtension,
cert->pCertInfo->rgExtension)))
80 if (
info->AuthorityCertIssuer.cAltEntry &&
81 info->AuthorityCertSerialNumber.cbData)
86 for (
i = 0; !directoryName &&
87 i <
info->AuthorityCertIssuer.cAltEntry;
i++)
88 if (
info->AuthorityCertIssuer.rgAltEntry[
i].dwAltNameChoice
91 &
info->AuthorityCertIssuer.rgAltEntry[
i];
97 &
cert->pCertInfo->SerialNumber);
101 FIXME(
"no supported name type in authority key id2\n");
105 else if (
info->KeyId.cbData)
130 cert->pCertInfo->cExtension,
cert->pCertInfo->rgExtension)))
140 if (
info->CertIssuer.cbData &&
info->CertSerialNumber.cbData)
143 &
info->CertIssuer, &
cert->pCertInfo->Issuer) &&
145 &
cert->pCertInfo->SerialNumber);
147 else if (
info->KeyId.cbData)
175 &
cert->pCertInfo->Subject, &
cert->pCertInfo->Issuer);
192 for (
i = 0; !
err &&
i < numSteps;
i++)
295 data->hWVTStateData = provData;
366 TRACE(
"subjectFile->hFile: %p\n", subjectFile->
hFile);
370 wintrust_data.u.
pFile = &fileInfo;
388 if (!
data->padwTrustStepErrors)
391 switch (
data->pWintrustData->dwUnionChoice)
394 if (
data->pWintrustData->u.pBlob &&
397 data->pWintrustData->u.pBlob->cbMemObject ==
399 data->pWintrustData->u.pBlob->pbMemObject)
403 data->pWintrustData->u.pBlob->pbMemObject;
447 FIXME(
"unimplemented for %d\n",
data->pWintrustData->dwUnionChoice);
486 data->hWVTStateData = provData;
531 stateAction =
data->dwStateAction;
534 TRACE(
"no dwStateAction, assuming WTD_STATEACTION_IGNORE\n");
549 FIXME(
"unimplemented for %d\n",
data->dwStateAction);
568 TRACE(
"%p\n", catalog);
573 TRACE(
"pcwszCatalogFilePath: %s\n",
576 TRACE(
"pcwszMemberFilePath: %s\n",
593 TRACE(
"cbMemObject: %d\n",
blob->cbMemObject);
594 TRACE(
"pbMemObject: %p\n",
blob->pbMemObject);
595 TRACE(
"cbMemSignedMsg: %d\n",
blob->cbMemSignedMsg);
596 TRACE(
"pbMemSignedMsg: %p\n",
blob->pbMemSignedMsg);
619 TRACE(
"psCertContext: %p\n",
cert->psCertContext);
622 TRACE(
"psftVerifyAsOf: %p\n",
cert->psftVerifyAsOf);
632 TRACE(
"pPolicyCallbackData: %p\n",
data->pPolicyCallbackData);
633 TRACE(
"pSIPClientData: %p\n",
data->pSIPClientData);
634 TRACE(
"dwUIChoice: %d\n",
data->dwUIChoice);
635 TRACE(
"fdwRevocationChecks: %08x\n",
data->fdwRevocationChecks);
636 TRACE(
"dwUnionChoice: %d\n",
data->dwUnionChoice);
637 switch (
data->dwUnionChoice)
655 TRACE(
"dwStateAction: %d\n",
data->dwStateAction);
656 TRACE(
"hWVTStateData: %p\n",
data->hWVTStateData);
658 TRACE(
"dwProvFlags: %08x\n",
data->dwProvFlags);
659 TRACE(
"dwUIContext: %d\n",
data->dwUIContext);
683 static const GUID unknown = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47,
684 0x00,0xC0,0x4F,0xC2,0x95,0xEE } };
699 else if (
IsEqualGUID(ActionID, &cert_action_verify))
710 WARN(
"unknown action %s, default behavior may not be right\n",
716 TRACE(
"no dwStateAction, assuming WTD_STATEACTION_IGNORE\n");
753 DWORD idxCounterSigner)
757 TRACE(
"(%p %d %d %d)\n", pProvData, idxSigner, fCounterSigner,
770 TRACE(
"returning %p\n", sgnr);
782 TRACE(
"(%p %d)\n", pSgnr, idxCert);
815 TRACE(
"%p\n", hStateData);
826 return data->u.pFile->pcwszFilePath;
838 return data->u.pFile->hFile;
868 (*usages)[cUsages] = pInfo;
869 (*usages)[cUsages + 1] =
NULL;
930 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
931 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
932 'W',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
933 'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'\\',
934 'W',
'i',
'n',
't',
'r',
'u',
's',
't',
'\\',
935 'T',
'r',
'u',
's',
't',
' ',
'P',
'r',
'o',
'v',
'i',
'd',
'e',
'r',
's',
'\\',
936 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
' ',
937 'P',
'u',
'b',
'l',
'i',
's',
'h',
'i',
'n',
'g',0 };
948 TRACE(
"%p\n", pdwPolicyFlags);
981 TRACE(
"%x\n", dwPolicyFlags);
1011 if (
data->pahStores)
1026 TRACE(
"(%p, %d, %d, %p)\n",
data, fCounterSigner, idxSigner, sgnr);
1035 FIXME(
"unimplemented for counter signers\n");
1039 if (
data->csSigners)
1045 data->csSigners = 0;
1047 if (
data->pasSigners)
1049 if (idxSigner < data->csSigners)
1051 &
data->pasSigners[idxSigner + 1],
1079 TRACE(
"(%p, %d, %d, %d, %p)\n",
data, idxSigner, fCounterSigner,
1080 idxSigner, pCert2Add);
1084 FIXME(
"unimplemented for counter signers\n");
1088 if (
data->pasSigners[idxSigner].csCertChain)
1089 data->pasSigners[idxSigner].pasCertChain =
1091 (
data->pasSigners[idxSigner].csCertChain + 1) *
1095 data->pasSigners[idxSigner].pasCertChain =
1097 data->pasSigners[idxSigner].csCertChain = 0;
1099 if (
data->pasSigners[idxSigner].pasCertChain)
1102 data->pasSigners[idxSigner].csCertChain];
1106 data->pasSigners[idxSigner].csCertChain++;
1119 TRACE(
"(%p, %p)\n",
data, pPrivData2Add);
1124 WARN(
"invalid struct size\n");
1127 if (
data->csProvPrivData)
1133 data->csProvPrivData = 0;
1135 if (
data->pasProvPrivData)
1139 for (
i = 0;
i <
data->csProvPrivData;
i++)
1143 data->pasProvPrivData[
i] = *pPrivData2Add;
1144 if (
i ==
data->csProvPrivData)
1145 data->csProvPrivData++;
1168 uiCertMgr.
dwSize =
sizeof(uiCertMgr);
1190 static const GUID catGUID = { 0xDE351A43, 0x8E59, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }};
1204 DWORD *pcCertChains,
BYTE* pbEncodedIssuerName,
DWORD cbEncodedIssuerName,
1207 FIXME(
"(%p, %p, %p, %p, %d, %s, %d): stub\n", pCertChains, pcbCertChains,
1208 pcCertChains, pbEncodedIssuerName, cbEncodedIssuerName,
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara, void *pvStructInfo, DWORD *pcbStructInfo)
#define CERT_CERTIFICATE_ACTION_VERIFY
#define CRYPTUI_CERT_MGR_PUBLISHER_TAB
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)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
BOOL WINAPI CertCompareCertificateName(DWORD dwCertEncodingType, PCERT_NAME_BLOB pCertName1, PCERT_NAME_BLOB pCertName2)
PCERT_EXTENSION WINAPI CertFindExtension(LPCSTR pszObjId, DWORD cExtensions, CERT_EXTENSION rgExtensions[])
BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext, DWORD dwPropId, void *pvData, DWORD *pcbData)
PCCERT_CONTEXT WINAPI CertDuplicateCertificateContext(PCCERT_CONTEXT pCertContext)
BOOL WINAPI CertCompareIntegerBlob(PCRYPT_INTEGER_BLOB pInt1, PCRYPT_INTEGER_BLOB pInt2)
LPVOID WINAPI CryptMemAlloc(ULONG cbSize)
VOID WINAPI CryptMemFree(LPVOID pv)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
BOOL WINAPI CryptEnumOIDInfo(DWORD dwGroupId, DWORD dwFlags, void *pvArg, PFN_CRYPT_ENUM_OID_INFO pfnEnumOIDInfo)
BOOL WINAPI CryptSIPRetrieveSubjectGuid(LPCWSTR FileName, HANDLE hFileIn, GUID *pgSubject)
HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
BOOL WINAPI CryptUIDlgCertMgr(PCCRYPTUI_CERT_MGR_STRUCT pCryptUICertMgr)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
static const WCHAR *const ext[]
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
VOID WINAPI GetSystemTime(OUT LPSYSTEMTIME lpSystemTime)
static const GUID catGUID
BOOL WINAPI WintrustLoadFunctionPointers(GUID *pgActionID, CRYPT_PROVIDER_FUNCTIONS *pPfns)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static HMODULE MODULEINFO DWORD cb
static DWORD DWORD DWORD DWORD * steps
static PCCRYPT_OID_INFO ** usages
#define IsEqualGUID(rguid1, rguid2)
#define WINTRUST_ACTION_GENERIC_VERIFY_V2
#define WINTRUST_ACTION_GENERIC_CHAIN_VERIFY
#define WINTRUST_ACTION_GENERIC_CERT_VERIFY
LPCWSTR pcwszCatalogFilePath
LPCWSTR pcwszMemberFilePath
PCCTL_CONTEXT pcCatalogContext
DWORD cbCalculatedFileHash
BYTE * pbCalculatedFileHash
CMSG_SIGNER_INFO * psSignerInfo
CERT_NAME_BLOB DirectoryName
HCERTSTORE * rghstoreRoots
HCERTSTORE * rghstoreTrust
CRYPT_PROVIDER_PRIVDATA * pasProvPrivData
CRYPT_PROVIDER_SGNR * pasSigners
CRYPT_PROVIDER_FUNCTIONS * psPfns
DWORD * padwTrustStepErrors
WINTRUST_DATA * pWintrustData
DWORD dwRegPolicySettings
struct _PROVDATA_SIP * pPDSip
PFN_PROVIDER_CLEANUP_CALL pfnCleanupPolicy
PFN_PROVIDER_CERTTRUST_CALL pfnCertificateTrust
PFN_PROVIDER_OBJTRUST_CALL pfnObjectTrust
PFN_PROVIDER_SIGTRUST_CALL pfnSignatureTrust
PFN_PROVIDER_FINALPOLICY_CALL pfnFinalPolicy
PFN_PROVIDER_INIT_CALL pfnInitialize
PFN_PROVIDER_CERTCHKPOLICY_CALL pfnCertCheckPolicy
struct _CRYPT_PROVIDER_SGNR * pasCounterSigners
CRYPT_PROVIDER_CERT * pasCertChain
struct WINTRUST_FILE_INFO_ * pFile
DWORD WINAPI GetLastError(void)
#define X509_AUTHORITY_KEY_ID2
#define szOID_AUTHORITY_KEY_IDENTIFIER
#define CRYPT_DECODE_NOCOPY_FLAG
#define CERT_KEY_IDENTIFIER_PROP_ID
#define CERT_ALT_NAME_DIRECTORY_NAME
#define CRYPT_ENHKEY_USAGE_OID_GROUP_ID
#define CRYPT_DECODE_ALLOC_FLAG
#define X509_AUTHORITY_KEY_ID
#define szOID_AUTHORITY_KEY_IDENTIFIER2
#define __WINE_ALLOC_SIZE(x)
#define HKEY_CURRENT_USER
#define WVT_ISINSTRUCT(t, s, f)
#define WTD_CHOICE_CATALOG
#define WTPF_OFFLINEOK_COM
struct _CRYPT_PROVIDER_CERT CRYPT_PROVIDER_CERT
#define WTPF_IGNOREREVOCATIONONTS
#define TRUSTERROR_STEP_FINAL_OBJPROV
struct _CRYPT_PROVIDER_DATA CRYPT_PROVIDER_DATA
#define WTD_CHOICE_SIGNER
#define WTD_STATEACTION_CLOSE
struct _PROVDATA_SIP PROVDATA_SIP
#define TRUSTERROR_STEP_FINAL_WVTINIT
struct _CRYPT_PROVIDER_FUNCTIONS CRYPT_PROVIDER_FUNCTIONS
#define TRUSTERROR_STEP_FINAL_POLICYPROV
#define TRUSTERROR_MAX_STEPS
#define TRUSTERROR_STEP_FINAL_CERTPROV
#define WTD_STATEACTION_VERIFY
#define WTD_STATEACTION_IGNORE
#define WIN_SPUB_ACTION_PUBLISHED_SOFTWARE
#define WTPF_OFFLINEOK_IND
#define WTPF_OFFLINEOKNBU_COM
#define TRUSTERROR_STEP_FINAL_SIGPROV
#define WVT_IS_CBSTRUCT_GT_MEMBEROFFSET(t, s, f)
#define WTPF_OFFLINEOKNBU_IND
void *WINAPI WINTRUST_Alloc(DWORD cb)
static const WCHAR Software_Publishing[]
static LONG WINTRUST_CertActionVerify(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
HRESULT(WINAPI * wintrust_step_func)(CRYPT_PROVIDER_DATA *data)
static CRYPT_PROVIDER_DATA * WINTRUST_AllocateProviderData(void)
HANDLE WINAPI WTHelperGetFileHandle(WINTRUST_DATA *data)
BOOL WINAPI WTHelperGetKnownUsages(DWORD action, PCCRYPT_OID_INFO **usages)
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)
static void dump_sgnr_info(WINTRUST_SGNR_INFO *sgnr)
BOOL WINAPI OpenPersonalTrustDBDialog(HWND hwnd)
static LONG WINTRUST_PublishedSoftware(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
static LONG WINTRUST_CertVerify(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
BOOL WINAPI IsCatalogFile(HANDLE hFile, WCHAR *pwszFileName)
HRESULT WINAPI WTHelperCertCheckValidSignature(CRYPT_PROVIDER_DATA *pProvData)
void WINAPI WINTRUST_Free(void *p)
static void dump_catalog_info(WINTRUST_CATALOG_INFO *catalog)
static DWORD WINTRUST_ExecuteSteps(const struct wintrust_step *steps, DWORD numSteps, CRYPT_PROVIDER_DATA *provData)
static LONG WINTRUST_DefaultVerify(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
static void dump_cert_info(WINTRUST_CERT_INFO *cert)
static void * WINTRUST_ReAlloc(void *ptr, DWORD cb) __WINE_ALLOC_SIZE(2)
static LONG WINTRUST_DefaultVerifyAndClose(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
void WINAPI WintrustGetRegPolicyFlags(DWORD *pdwPolicyFlags)
static LONG WINTRUST_CertVerifyAndClose(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
HRESULT WINAPI WinVerifyTrustEx(HWND hwnd, GUID *ActionID, WINTRUST_DATA *ActionData)
BOOL WINAPI WINTRUST_AddStore(CRYPT_PROVIDER_DATA *data, HCERTSTORE store)
static void dump_blob_info(WINTRUST_BLOB_INFO *blob)
BOOL WINAPI WintrustSetRegPolicyFlags(DWORD dwPolicyFlags)
static void dump_wintrust_data(WINTRUST_DATA *data)
CRYPT_PROVIDER_DATA *WINAPI WTHelperProvDataFromStateData(HANDLE hStateData)
static void dump_file_info(WINTRUST_FILE_INFO *pFile)
static DWORD WINTRUST_AddTrustStepsFromFunctions(struct wintrust_step *steps, const CRYPT_PROVIDER_FUNCTIONS *psPfns)
BOOL WINAPI TrustIsCertificateSelfSigned(PCCERT_CONTEXT cert)
static HRESULT WINAPI WINTRUST_CertVerifyObjTrust(CRYPT_PROVIDER_DATA *data)
static BOOL WINAPI WINTRUST_enumUsages(PCCRYPT_OID_INFO pInfo, void *pvArg)
BOOL WINAPI WINTRUST_AddCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner, BOOL fCounterSigner, DWORD idxCounterSigner, PCCERT_CONTEXT pCert2Add)
HRESULT WINAPI FindCertsByIssuer(PCERT_CHAIN pCertChains, DWORD *pcbCertChains, DWORD *pcCertChains, BYTE *pbEncodedIssuerName, DWORD cbEncodedIssuerName, LPCWSTR pwszPurpose, DWORD dwKeySpec)
CRYPT_PROVIDER_PRIVDATA *WINAPI WTHelperGetProvPrivateDataFromChain(CRYPT_PROVIDER_DATA *pProvData, GUID *pgProviderID)
static LONG WINTRUST_DefaultClose(HWND hwnd, GUID *actionID, WINTRUST_DATA *data)
LPCWSTR WINAPI WTHelperGetFileName(WINTRUST_DATA *data)
BOOL WINAPI WINTRUST_AddPrivData(CRYPT_PROVIDER_DATA *data, CRYPT_PROVIDER_PRIVDATA *pPrivData2Add)
BOOL WINAPI WINTRUST_AddSgnr(CRYPT_PROVIDER_DATA *data, BOOL fCounterSigner, DWORD idxSigner, CRYPT_PROVIDER_SGNR *sgnr)
LONG WINAPI WinVerifyTrust(HWND hwnd, GUID *ActionID, LPVOID ActionData)
HWND WINAPI GetDesktopWindow(void)