crypt32: Remove remaining superfluous pointer casts.

This commit is contained in:
Michael Stefaniuc 2009-01-28 10:25:22 +01:00 committed by Alexandre Julliard
parent c0d2a21dd1
commit 903585162d
8 changed files with 116 additions and 123 deletions

View File

@ -37,7 +37,7 @@ typedef struct _WINE_FILESTOREINFO
static void WINAPI CRYPT_FileCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
{
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
PWINE_FILESTOREINFO store = hCertStore;
TRACE("(%p, %08x)\n", store, dwFlags);
if (store->dirty)
@ -51,7 +51,7 @@ static void WINAPI CRYPT_FileCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
static BOOL WINAPI CRYPT_FileWriteCert(HCERTSTORE hCertStore,
PCCERT_CONTEXT cert, DWORD dwFlags)
{
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
PWINE_FILESTOREINFO store = hCertStore;
TRACE("(%p, %p, %d)\n", hCertStore, cert, dwFlags);
store->dirty = TRUE;
@ -61,7 +61,7 @@ static BOOL WINAPI CRYPT_FileWriteCert(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_FileDeleteCert(HCERTSTORE hCertStore,
PCCERT_CONTEXT pCertContext, DWORD dwFlags)
{
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
PWINE_FILESTOREINFO store = hCertStore;
TRACE("(%p, %p, %08x)\n", hCertStore, pCertContext, dwFlags);
store->dirty = TRUE;
@ -71,7 +71,7 @@ static BOOL WINAPI CRYPT_FileDeleteCert(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_FileWriteCRL(HCERTSTORE hCertStore,
PCCRL_CONTEXT crl, DWORD dwFlags)
{
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
PWINE_FILESTOREINFO store = hCertStore;
TRACE("(%p, %p, %d)\n", hCertStore, crl, dwFlags);
store->dirty = TRUE;
@ -81,7 +81,7 @@ static BOOL WINAPI CRYPT_FileWriteCRL(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_FileDeleteCRL(HCERTSTORE hCertStore,
PCCRL_CONTEXT pCrlContext, DWORD dwFlags)
{
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
PWINE_FILESTOREINFO store = hCertStore;
TRACE("(%p, %p, %08x)\n", hCertStore, pCrlContext, dwFlags);
store->dirty = TRUE;
@ -91,7 +91,7 @@ static BOOL WINAPI CRYPT_FileDeleteCRL(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_FileWriteCTL(HCERTSTORE hCertStore,
PCCTL_CONTEXT ctl, DWORD dwFlags)
{
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
PWINE_FILESTOREINFO store = hCertStore;
TRACE("(%p, %p, %d)\n", hCertStore, ctl, dwFlags);
store->dirty = TRUE;
@ -101,7 +101,7 @@ static BOOL WINAPI CRYPT_FileWriteCTL(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_FileDeleteCTL(HCERTSTORE hCertStore,
PCCTL_CONTEXT pCtlContext, DWORD dwFlags)
{
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
PWINE_FILESTOREINFO store = hCertStore;
TRACE("(%p, %p, %08x)\n", hCertStore, pCtlContext, dwFlags);
store->dirty = TRUE;
@ -129,7 +129,7 @@ static BOOL CRYPT_ReadBlobFromFile(HANDLE file, PCERT_BLOB blob)
static BOOL WINAPI CRYPT_FileControl(HCERTSTORE hCertStore, DWORD dwFlags,
DWORD dwCtrlType, void const *pvCtrlPara)
{
PWINE_FILESTOREINFO store = (PWINE_FILESTOREINFO)hCertStore;
PWINE_FILESTOREINFO store = hCertStore;
BOOL ret;
TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType,
@ -292,7 +292,7 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara)
{
HCERTSTORE store = 0;
LPCWSTR fileName = (LPCWSTR)pvPara;
LPCWSTR fileName = pvPara;
DWORD access, create;
HANDLE file;
@ -376,7 +376,7 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
CryptReleaseContext(hCryptProv, 0);
}
}
return (PWINECRYPT_CERTSTORE)store;
return store;
}
PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
@ -386,21 +386,21 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
PWINECRYPT_CERTSTORE ret = NULL;
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
debugstr_a((LPCSTR)pvPara));
debugstr_a(pvPara));
if (!pvPara)
{
SetLastError(ERROR_FILE_NOT_FOUND);
return NULL;
}
len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, NULL, 0);
len = MultiByteToWideChar(CP_ACP, 0, pvPara, -1, NULL, 0);
if (len)
{
LPWSTR storeName = CryptMemAlloc(len * sizeof(WCHAR));
if (storeName)
{
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, storeName, len);
MultiByteToWideChar(CP_ACP, 0, pvPara, -1, storeName, len);
ret = CRYPT_FileNameOpenStoreW(hCryptProv, dwFlags, storeName);
CryptMemFree(storeName);
}

View File

@ -109,7 +109,7 @@ static const BYTE empty_data_content[] = { 0x04,0x00 };
static void CDataEncodeMsg_Close(HCRYPTMSG hCryptMsg)
{
CDataEncodeMsg *msg = (CDataEncodeMsg *)hCryptMsg;
CDataEncodeMsg *msg = hCryptMsg;
if (msg->bare_content != empty_data_content)
LocalFree(msg->bare_content);
@ -191,7 +191,7 @@ static BOOL CRYPT_EncodeDataContentInfoHeader(CDataEncodeMsg *msg,
static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
DWORD cbData, BOOL fFinal)
{
CDataEncodeMsg *msg = (CDataEncodeMsg *)hCryptMsg;
CDataEncodeMsg *msg = hCryptMsg;
BOOL ret = FALSE;
if (msg->base.state == MsgStateFinalized)
@ -320,7 +320,7 @@ static BOOL CRYPT_CopyParam(void *pvData, DWORD *pcbData, const void *src,
static BOOL CDataEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
DWORD dwIndex, void *pvData, DWORD *pcbData)
{
CDataEncodeMsg *msg = (CDataEncodeMsg *)hCryptMsg;
CDataEncodeMsg *msg = hCryptMsg;
BOOL ret = FALSE;
switch (dwParamType)
@ -372,7 +372,7 @@ static HCRYPTMSG CDataEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
msg->bare_content_len = sizeof(empty_data_content);
msg->bare_content = (LPBYTE)empty_data_content;
}
return (HCRYPTMSG)msg;
return msg;
}
typedef struct _CHashEncodeMsg
@ -385,7 +385,7 @@ typedef struct _CHashEncodeMsg
static void CHashEncodeMsg_Close(HCRYPTMSG hCryptMsg)
{
CHashEncodeMsg *msg = (CHashEncodeMsg *)hCryptMsg;
CHashEncodeMsg *msg = hCryptMsg;
CryptMemFree(msg->data.pbData);
CryptDestroyHash(msg->hash);
@ -444,7 +444,7 @@ static BOOL CRYPT_EncodePKCSDigestedData(CHashEncodeMsg *msg, void *pvData,
static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
DWORD dwIndex, void *pvData, DWORD *pcbData)
{
CHashEncodeMsg *msg = (CHashEncodeMsg *)hCryptMsg;
CHashEncodeMsg *msg = hCryptMsg;
BOOL ret = FALSE;
TRACE("(%p, %d, %d, %p, %p)\n", hCryptMsg, dwParamType, dwIndex,
@ -487,8 +487,7 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
break;
}
case CMSG_COMPUTED_HASH_PARAM:
ret = CryptGetHashParam(msg->hash, HP_HASHVAL, (BYTE *)pvData, pcbData,
0);
ret = CryptGetHashParam(msg->hash, HP_HASHVAL, pvData, pcbData, 0);
break;
case CMSG_VERSION_PARAM:
if (msg->base.state != MsgStateFinalized)
@ -512,7 +511,7 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
static BOOL CHashEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
DWORD cbData, BOOL fFinal)
{
CHashEncodeMsg *msg = (CHashEncodeMsg *)hCryptMsg;
CHashEncodeMsg *msg = hCryptMsg;
BOOL ret = FALSE;
TRACE("(%p, %p, %d, %d)\n", hCryptMsg, pbData, cbData, fFinal);
@ -555,8 +554,7 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
LPSTR pszInnerContentObjID, PCMSG_STREAM_INFO pStreamInfo)
{
CHashEncodeMsg *msg;
const CMSG_HASHED_ENCODE_INFO *info =
(const CMSG_HASHED_ENCODE_INFO *)pvMsgEncodeInfo;
const CMSG_HASHED_ENCODE_INFO *info = pvMsgEncodeInfo;
HCRYPTPROV prov;
ALG_ID algID;
@ -592,7 +590,7 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
msg = NULL;
}
}
return (HCRYPTMSG)msg;
return msg;
}
typedef struct _CMSG_SIGNER_ENCODE_INFO_WITH_CMS
@ -1086,7 +1084,7 @@ static BOOL CSignedMsgData_UpdateAuthenticatedAttributes(
ret = CryptEncodeObjectEx(X509_ASN_ENCODING, PKCS_ATTRIBUTES,
&msg_data->info->rgSignerInfo[i].AuthAttrs,
CRYPT_ENCODE_ALLOC_FLAG, NULL, (LPBYTE)&encodedAttrs, &size);
CRYPT_ENCODE_ALLOC_FLAG, NULL, &encodedAttrs, &size);
if (ret)
{
ret = CryptHashData(
@ -1176,7 +1174,7 @@ typedef struct _CSignedEncodeMsg
static void CSignedEncodeMsg_Close(HCRYPTMSG hCryptMsg)
{
CSignedEncodeMsg *msg = (CSignedEncodeMsg *)hCryptMsg;
CSignedEncodeMsg *msg = hCryptMsg;
DWORD i;
CryptMemFree(msg->innerOID);
@ -1193,7 +1191,7 @@ static void CSignedEncodeMsg_Close(HCRYPTMSG hCryptMsg)
static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
DWORD dwIndex, void *pvData, DWORD *pcbData)
{
CSignedEncodeMsg *msg = (CSignedEncodeMsg *)hCryptMsg;
CSignedEncodeMsg *msg = hCryptMsg;
BOOL ret = FALSE;
switch (dwParamType)
@ -1301,7 +1299,7 @@ static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
static BOOL CSignedEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
DWORD cbData, BOOL fFinal)
{
CSignedEncodeMsg *msg = (CSignedEncodeMsg *)hCryptMsg;
CSignedEncodeMsg *msg = hCryptMsg;
BOOL ret = FALSE;
if (msg->base.state == MsgStateFinalized)
@ -1345,8 +1343,7 @@ static HCRYPTMSG CSignedEncodeMsg_Open(DWORD dwFlags,
const void *pvMsgEncodeInfo, LPSTR pszInnerContentObjID,
PCMSG_STREAM_INFO pStreamInfo)
{
const CMSG_SIGNED_ENCODE_INFO_WITH_CMS *info =
(const CMSG_SIGNED_ENCODE_INFO_WITH_CMS *)pvMsgEncodeInfo;
const CMSG_SIGNED_ENCODE_INFO_WITH_CMS *info = pvMsgEncodeInfo;
DWORD i;
CSignedEncodeMsg *msg;
@ -1510,7 +1507,7 @@ typedef struct _CDecodeMsg
static void CDecodeMsg_Close(HCRYPTMSG hCryptMsg)
{
CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg;
CDecodeMsg *msg = hCryptMsg;
if (msg->base.open_flags & CMSG_CRYPT_RELEASE_CONTEXT_FLAG)
CryptReleaseContext(msg->crypt_prov, 0);
@ -1563,8 +1560,7 @@ static BOOL CDecodeMsg_DecodeDataContent(CDecodeMsg *msg, CRYPT_DER_BLOB *blob)
DWORD size;
ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_OCTET_STRING,
blob->pbData, blob->cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, (LPBYTE)&data,
&size);
blob->pbData, blob->cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, &data, &size);
if (ret)
{
ret = ContextPropertyList_SetProperty(msg->properties,
@ -1703,7 +1699,7 @@ static BOOL CDecodeMsg_DecodeContent(CDecodeMsg *msg, CRYPT_DER_BLOB *blob,
ret = CryptDecodeObjectEx(X509_ASN_ENCODING, PKCS_CONTENT_INFO,
msg->msg_data.pbData, msg->msg_data.cbData, CRYPT_DECODE_ALLOC_FLAG,
NULL, (LPBYTE)&info, &size);
NULL, &info, &size);
if (ret)
{
if (!strcmp(info->pszObjId, szOID_RSA_data))
@ -1802,7 +1798,7 @@ static BOOL CDecodeMsg_FinalizeSignedContent(CDecodeMsg *msg,
ret = CryptDecodeObjectEx(X509_ASN_ENCODING,
X509_OCTET_STRING, content->pbData, content->cbData,
CRYPT_DECODE_ALLOC_FLAG, NULL, (LPBYTE)&blob, &size);
CRYPT_DECODE_ALLOC_FLAG, NULL, &blob, &size);
if (ret)
{
ret = CSignedMsgData_Update(&msg->u.signed_data,
@ -1839,7 +1835,7 @@ static BOOL CDecodeMsg_FinalizeContent(CDecodeMsg *msg, CRYPT_DER_BLOB *blob)
static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
DWORD cbData, BOOL fFinal)
{
CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg;
CDecodeMsg *msg = hCryptMsg;
BOOL ret = FALSE;
TRACE("(%p, %p, %d, %d)\n", hCryptMsg, pbData, cbData, fFinal);
@ -1939,7 +1935,7 @@ static BOOL CDecodeHashMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
{
ret = CRYPT_CopyParam(pvData, pcbData, blob.pbData, blob.cbData);
if (ret && pvData)
CRYPT_FixUpAlgorithmID((CRYPT_ALGORITHM_IDENTIFIER *)pvData);
CRYPT_FixUpAlgorithmID(pvData);
}
else
SetLastError(CRYPT_E_INVALID_MSG_TYPE);
@ -2136,7 +2132,7 @@ static BOOL CRYPT_CopySignerInfo(void *pvData, DWORD *pcbData,
else
{
LPBYTE nextData = (BYTE *)pvData + sizeof(CMSG_SIGNER_INFO);
CMSG_SIGNER_INFO *out = (CMSG_SIGNER_INFO *)pvData;
CMSG_SIGNER_INFO *out = pvData;
ret = TRUE;
out->dwVersion = in->dwVersion;
@ -2206,7 +2202,7 @@ static BOOL CRYPT_CopyCMSSignerInfo(void *pvData, DWORD *pcbData,
else
{
LPBYTE nextData = (BYTE *)pvData + sizeof(CMSG_CMS_SIGNER_INFO);
CMSG_CMS_SIGNER_INFO *out = (CMSG_CMS_SIGNER_INFO *)pvData;
CMSG_CMS_SIGNER_INFO *out = pvData;
out->dwVersion = in->dwVersion;
out->SignerId.dwIdChoice = in->SignerId.dwIdChoice;
@ -2265,7 +2261,7 @@ static BOOL CRYPT_CopySignerCertInfo(void *pvData, DWORD *pcbData,
else
{
LPBYTE nextData = (BYTE *)pvData + sizeof(CERT_INFO);
CERT_INFO *out = (CERT_INFO *)pvData;
CERT_INFO *out = pvData;
memset(out, 0, sizeof(CERT_INFO));
if (in->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER)
@ -2306,7 +2302,7 @@ static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_OCTET_STRING,
msg->u.signed_data.info->content.Content.pbData,
msg->u.signed_data.info->content.Content.cbData,
CRYPT_DECODE_ALLOC_FLAG, NULL, (LPBYTE)&blob, &size);
CRYPT_DECODE_ALLOC_FLAG, NULL, &blob, &size);
if (ret)
{
ret = CRYPT_CopyParam(pvData, pcbData, blob->pbData,
@ -2453,7 +2449,7 @@ static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
DWORD dwIndex, void *pvData, DWORD *pcbData)
{
CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg;
CDecodeMsg *msg = hCryptMsg;
BOOL ret = FALSE;
switch (msg->type)
@ -2628,12 +2624,11 @@ static BOOL CDecodeSignedMsg_VerifySignatureEx(CDecodeMsg *msg,
{
case CMSG_VERIFY_SIGNER_PUBKEY:
ret = CDecodeSignedMsg_VerifySignatureWithKey(msg,
para->hCryptProv, para->dwSignerIndex,
(PCERT_PUBLIC_KEY_INFO)para->pvSigner);
para->hCryptProv, para->dwSignerIndex, para->pvSigner);
break;
case CMSG_VERIFY_SIGNER_CERT:
{
PCCERT_CONTEXT cert = (PCCERT_CONTEXT)para->pvSigner;
PCCERT_CONTEXT cert = para->pvSigner;
ret = CDecodeSignedMsg_VerifySignatureWithKey(msg, para->hCryptProv,
para->dwSignerIndex, &cert->pCertInfo->SubjectPublicKeyInfo);
@ -2650,7 +2645,7 @@ static BOOL CDecodeSignedMsg_VerifySignatureEx(CDecodeMsg *msg,
static BOOL CDecodeMsg_Control(HCRYPTMSG hCryptMsg, DWORD dwFlags,
DWORD dwCtrlType, const void *pvCtrlPara)
{
CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg;
CDecodeMsg *msg = hCryptMsg;
BOOL ret = FALSE;
switch (dwCtrlType)
@ -2743,7 +2738,7 @@ HCRYPTMSG WINAPI CryptMsgDuplicate(HCRYPTMSG hCryptMsg)
if (hCryptMsg)
{
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
CryptMsgBase *msg = hCryptMsg;
InterlockedIncrement(&msg->ref);
}
@ -2756,7 +2751,7 @@ BOOL WINAPI CryptMsgClose(HCRYPTMSG hCryptMsg)
if (hCryptMsg)
{
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
CryptMsgBase *msg = hCryptMsg;
if (InterlockedDecrement(&msg->ref) == 0)
{
@ -2772,7 +2767,7 @@ BOOL WINAPI CryptMsgClose(HCRYPTMSG hCryptMsg)
BOOL WINAPI CryptMsgUpdate(HCRYPTMSG hCryptMsg, const BYTE *pbData,
DWORD cbData, BOOL fFinal)
{
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
CryptMsgBase *msg = hCryptMsg;
TRACE("(%p, %p, %d, %d)\n", hCryptMsg, pbData, cbData, fFinal);
@ -2782,7 +2777,7 @@ BOOL WINAPI CryptMsgUpdate(HCRYPTMSG hCryptMsg, const BYTE *pbData,
BOOL WINAPI CryptMsgGetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
DWORD dwIndex, void *pvData, DWORD *pcbData)
{
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
CryptMsgBase *msg = hCryptMsg;
TRACE("(%p, %d, %d, %p, %p)\n", hCryptMsg, dwParamType, dwIndex,
pvData, pcbData);
@ -2792,7 +2787,7 @@ BOOL WINAPI CryptMsgGetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
BOOL WINAPI CryptMsgControl(HCRYPTMSG hCryptMsg, DWORD dwFlags,
DWORD dwCtrlType, const void *pvCtrlPara)
{
CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg;
CryptMsgBase *msg = hCryptMsg;
TRACE("(%p, %08x, %d, %p)\n", hCryptMsg, dwFlags, dwCtrlType,
pvCtrlPara);

View File

@ -108,11 +108,11 @@ static BOOL CRYPT_QueryContextObject(DWORD dwObjectType, const void *pvObject,
/* Cert, CRL, and CTL contexts can't be "embedded" in a file, so
* just read the file directly
*/
ret = CRYPT_ReadBlobFromFile((LPCWSTR)pvObject, &fileBlob);
ret = CRYPT_ReadBlobFromFile(pvObject, &fileBlob);
blob = &fileBlob;
break;
case CERT_QUERY_OBJECT_BLOB:
blob = (const CERT_BLOB *)pvObject;
blob = pvObject;
ret = TRUE;
break;
default:
@ -198,11 +198,11 @@ static BOOL CRYPT_QuerySerializedContextObject(DWORD dwObjectType,
/* Cert, CRL, and CTL contexts can't be "embedded" in a file, so
* just read the file directly
*/
ret = CRYPT_ReadBlobFromFile((LPCWSTR)pvObject, &fileBlob);
ret = CRYPT_ReadBlobFromFile(pvObject, &fileBlob);
blob = &fileBlob;
break;
case CERT_QUERY_OBJECT_BLOB:
blob = (const CERT_BLOB *)pvObject;
blob = pvObject;
ret = TRUE;
break;
default:
@ -287,7 +287,7 @@ static BOOL CRYPT_QuerySerializedStoreObject(DWORD dwObjectType,
const void *pvObject, DWORD *pdwMsgAndCertEncodingType, DWORD *pdwContentType,
HCERTSTORE *phCertStore, HCRYPTMSG *phMsg)
{
LPCWSTR fileName = (LPCWSTR)pvObject;
LPCWSTR fileName = pvObject;
HANDLE file;
BOOL ret = FALSE;
@ -450,11 +450,11 @@ static BOOL CRYPT_QueryMessageObject(DWORD dwObjectType, const void *pvObject,
/* This isn't an embedded PKCS7 message, so just read the file
* directly
*/
ret = CRYPT_ReadBlobFromFile((LPCWSTR)pvObject, &fileBlob);
ret = CRYPT_ReadBlobFromFile(pvObject, &fileBlob);
blob = &fileBlob;
break;
case CERT_QUERY_OBJECT_BLOB:
blob = (const CERT_BLOB *)pvObject;
blob = pvObject;
ret = TRUE;
break;
default:
@ -583,7 +583,7 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
GUID subject;
BOOL ret = FALSE;
TRACE("%s\n", debugstr_w((LPCWSTR)pvObject));
TRACE("%s\n", debugstr_w(pvObject));
if (dwObjectType != CERT_QUERY_OBJECT_FILE)
{
@ -592,11 +592,11 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
SetLastError(E_INVALIDARG);
return FALSE;
}
file = CreateFileW((LPCWSTR)pvObject, GENERIC_READ, FILE_SHARE_READ,
file = CreateFileW(pvObject, GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (file != INVALID_HANDLE_VALUE)
{
ret = CryptSIPRetrieveSubjectGuid((LPCWSTR)pvObject, file, &subject);
ret = CryptSIPRetrieveSubjectGuid(pvObject, file, &subject);
if (ret)
{
SIP_DISPATCH_INFO sip;
@ -614,7 +614,7 @@ static BOOL CRYPT_QueryEmbeddedMessageObject(DWORD dwObjectType,
subjectInfo.cbSize = sizeof(subjectInfo);
subjectInfo.pgSubjectType = &subject;
subjectInfo.hFile = file;
subjectInfo.pwsFileName = (LPCWSTR)pvObject;
subjectInfo.pwsFileName = pvObject;
ret = sip.pfGet(&subjectInfo, &encodingType, 0, &blob.cbData,
NULL);
if (ret)
@ -1623,7 +1623,7 @@ static BOOL WINAPI CRYPT_FormatAuthorityInfoAccess(DWORD dwCertEncodingType,
else
{
*pcbFormat = bytesNeeded;
strcpyW((LPWSTR)pbFormat, infoNotAvailable);
strcpyW(pbFormat, infoNotAvailable);
}
}
else
@ -2021,7 +2021,7 @@ static BOOL WINAPI CRYPT_FormatCRLDistPoints(DWORD dwCertEncodingType,
else
{
*pcbFormat = bytesNeeded;
strcpyW((LPWSTR)pbFormat, infoNotAvailable);
strcpyW(pbFormat, infoNotAvailable);
}
}
else

View File

@ -123,7 +123,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
{
if (!strcasecmp(pszFuncName, cursor->name))
{
ret = (HCRYPTOIDFUNCSET)cursor;
ret = cursor;
break;
}
}
@ -151,7 +151,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
}
LeaveCriticalSection(&funcSetCS);
return (HCRYPTOIDFUNCSET)ret;
return ret;
}
static char *CRYPT_GetKeyName(DWORD dwEncodingType, LPCSTR pszFuncName,
@ -194,7 +194,7 @@ BOOL WINAPI CryptGetDefaultOIDDllList(HCRYPTOIDFUNCSET hFuncSet,
DWORD dwEncodingType, LPWSTR pwszDllList, DWORD *pcchDllList)
{
BOOL ret = TRUE;
struct OIDFunctionSet *set = (struct OIDFunctionSet *)hFuncSet;
struct OIDFunctionSet *set = hFuncSet;
char *keyName;
HKEY key;
long rc;
@ -244,7 +244,7 @@ BOOL WINAPI CryptInstallOIDFunctionAddress(HMODULE hModule,
TRACE("(%p, %d, %s, %d, %p, %08x)\n", hModule, dwEncodingType,
debugstr_a(pszFuncName), cFuncEntry, rgFuncEntry, dwFlags);
set = (struct OIDFunctionSet *)CryptInitOIDFunctionSet(pszFuncName, 0);
set = CryptInitOIDFunctionSet(pszFuncName, 0);
if (set)
{
DWORD i;
@ -386,7 +386,7 @@ BOOL WINAPI CryptGetOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
HCRYPTOIDFUNCADDR *phFuncAddr)
{
BOOL ret = FALSE;
struct OIDFunctionSet *set = (struct OIDFunctionSet *)hFuncSet;
struct OIDFunctionSet *set = hFuncSet;
TRACE("(%p, %d, %s, %08x, %p, %p)\n", hFuncSet, dwEncodingType,
debugstr_a(pszOID), dwFlags, ppvFuncAddr, phFuncAddr);
@ -441,7 +441,7 @@ BOOL WINAPI CryptFreeOIDFunctionAddress(HCRYPTOIDFUNCADDR hFuncAddr,
*/
if (hFuncAddr)
{
struct FuncAddr *addr = (struct FuncAddr *)hFuncAddr;
struct FuncAddr *addr = hFuncAddr;
CryptMemFree(addr->dllList);
FreeLibrary(addr->lib);
@ -474,7 +474,7 @@ BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
DWORD dwEncodingType, LPCWSTR pwszDll, DWORD dwFlags, void **ppvFuncAddr,
HCRYPTOIDFUNCADDR *phFuncAddr)
{
struct OIDFunctionSet *set = (struct OIDFunctionSet *)hFuncSet;
struct OIDFunctionSet *set = hFuncSet;
BOOL ret = FALSE;
TRACE("(%p, %d, %s, %08x, %p, %p)\n", hFuncSet, dwEncodingType,
@ -509,7 +509,7 @@ BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet,
}
else
{
struct FuncAddr *addr = (struct FuncAddr *)*phFuncAddr;
struct FuncAddr *addr = *phFuncAddr;
if (!addr)
{
@ -1504,11 +1504,11 @@ PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void *pvKey,
{
struct OIDInfo *info;
TRACE("CRYPT_OID_INFO_NAME_KEY: %s\n", debugstr_w((LPWSTR)pvKey));
TRACE("CRYPT_OID_INFO_NAME_KEY: %s\n", debugstr_w(pvKey));
EnterCriticalSection(&oidInfoCS);
LIST_FOR_EACH_ENTRY(info, &oidInfo, struct OIDInfo, entry)
{
if (!lstrcmpW(info->info.pwszName, (LPWSTR)pvKey) &&
if (!lstrcmpW(info->info.pwszName, pvKey) &&
(!dwGroupId || info->info.dwGroupId == dwGroupId))
{
ret = &info->info;
@ -1521,7 +1521,7 @@ PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void *pvKey,
case CRYPT_OID_INFO_OID_KEY:
{
struct OIDInfo *info;
LPSTR oid = (LPSTR)pvKey;
LPSTR oid = pvKey;
TRACE("CRYPT_OID_INFO_OID_KEY: %s\n", debugstr_a(oid));
EnterCriticalSection(&oidInfoCS);

View File

@ -43,7 +43,7 @@ typedef struct _WINE_PROVIDERSTORE
static void WINAPI CRYPT_ProvCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
{
PWINE_PROVIDERSTORE store = (PWINE_PROVIDERSTORE)hCertStore;
PWINE_PROVIDERSTORE store = hCertStore;
TRACE("(%p, %08x)\n", store, dwFlags);
@ -69,7 +69,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert,
{
ret = TRUE;
if (ps->provWriteCert)
ret = ps->provWriteCert(ps->hStoreProv, (PCCERT_CONTEXT)cert,
ret = ps->provWriteCert(ps->hStoreProv, cert,
CERT_STORE_PROV_WRITE_ADD_FLAG);
if (ret)
ret = ps->memStore->certs.addContext(ps->memStore, cert, NULL,
@ -135,7 +135,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl,
{
ret = TRUE;
if (ps->provWriteCrl)
ret = ps->provWriteCrl(ps->hStoreProv, (PCCRL_CONTEXT)crl,
ret = ps->provWriteCrl(ps->hStoreProv, crl,
CERT_STORE_PROV_WRITE_ADD_FLAG);
if (ret)
ret = ps->memStore->crls.addContext(ps->memStore, crl, NULL,
@ -202,7 +202,7 @@ static BOOL CRYPT_ProvAddCTL(PWINECRYPT_CERTSTORE store, void *ctl,
{
ret = TRUE;
if (ps->provWriteCtl)
ret = ps->provWriteCtl(ps->hStoreProv, (PCCTL_CONTEXT)ctl,
ret = ps->provWriteCtl(ps->hStoreProv, ctl,
CERT_STORE_PROV_WRITE_ADD_FLAG);
if (ret)
ret = ps->memStore->ctls.addContext(ps->memStore, ctl, NULL,
@ -250,7 +250,7 @@ static BOOL CRYPT_ProvDeleteCTL(PWINECRYPT_CERTSTORE store, void *ctl)
static BOOL WINAPI CRYPT_ProvControl(HCERTSTORE hCertStore, DWORD dwFlags,
DWORD dwCtrlType, void const *pvCtrlPara)
{
PWINE_PROVIDERSTORE store = (PWINE_PROVIDERSTORE)hCertStore;
PWINE_PROVIDERSTORE store = hCertStore;
BOOL ret = TRUE;
TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType,

View File

@ -319,7 +319,7 @@ static BOOL CRYPT_RegFlushStore(PWINE_REGSTOREINFO store, BOOL force)
static void WINAPI CRYPT_RegCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
{
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
PWINE_REGSTOREINFO store = hCertStore;
TRACE("(%p, %08x)\n", store, dwFlags);
if (dwFlags)
@ -392,7 +392,7 @@ static BOOL CRYPT_RegDeleteContext(PWINE_REGSTOREINFO store,
static BOOL WINAPI CRYPT_RegWriteCert(HCERTSTORE hCertStore,
PCCERT_CONTEXT cert, DWORD dwFlags)
{
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
PWINE_REGSTOREINFO store = hCertStore;
TRACE("(%p, %p, %d)\n", hCertStore, cert, dwFlags);
@ -402,7 +402,7 @@ static BOOL WINAPI CRYPT_RegWriteCert(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_RegDeleteCert(HCERTSTORE hCertStore,
PCCERT_CONTEXT pCertContext, DWORD dwFlags)
{
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
PWINE_REGSTOREINFO store = hCertStore;
TRACE("(%p, %p, %08x)\n", store, pCertContext, dwFlags);
@ -413,7 +413,7 @@ static BOOL WINAPI CRYPT_RegDeleteCert(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_RegWriteCRL(HCERTSTORE hCertStore,
PCCRL_CONTEXT crl, DWORD dwFlags)
{
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
PWINE_REGSTOREINFO store = hCertStore;
TRACE("(%p, %p, %d)\n", hCertStore, crl, dwFlags);
@ -423,7 +423,7 @@ static BOOL WINAPI CRYPT_RegWriteCRL(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_RegDeleteCRL(HCERTSTORE hCertStore,
PCCRL_CONTEXT pCrlContext, DWORD dwFlags)
{
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
PWINE_REGSTOREINFO store = hCertStore;
TRACE("(%p, %p, %08x)\n", store, pCrlContext, dwFlags);
@ -434,7 +434,7 @@ static BOOL WINAPI CRYPT_RegDeleteCRL(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_RegWriteCTL(HCERTSTORE hCertStore,
PCCTL_CONTEXT ctl, DWORD dwFlags)
{
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
PWINE_REGSTOREINFO store = hCertStore;
TRACE("(%p, %p, %d)\n", hCertStore, ctl, dwFlags);
@ -444,7 +444,7 @@ static BOOL WINAPI CRYPT_RegWriteCTL(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_RegDeleteCTL(HCERTSTORE hCertStore,
PCCTL_CONTEXT pCtlContext, DWORD dwFlags)
{
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
PWINE_REGSTOREINFO store = hCertStore;
TRACE("(%p, %p, %08x)\n", store, pCtlContext, dwFlags);
@ -455,7 +455,7 @@ static BOOL WINAPI CRYPT_RegDeleteCTL(HCERTSTORE hCertStore,
static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags,
DWORD dwCtrlType, void const *pvCtrlPara)
{
PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
PWINE_REGSTOREINFO store = hCertStore;
BOOL ret;
TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType,

View File

@ -627,7 +627,7 @@ static BOOL CRYPT_WriteSerializedStoreToFile(HANDLE file, HCERTSTORE store)
static BOOL CRYPT_SavePKCSToMem(HCERTSTORE store,
DWORD dwMsgAndCertEncodingType, void *handle)
{
CERT_BLOB *blob = (CERT_BLOB *)handle;
CERT_BLOB *blob = handle;
CRYPT_SIGNED_INFO signedInfo = { 0 };
PCCERT_CONTEXT cert = NULL;
PCCRL_CONTEXT crl = NULL;
@ -767,7 +767,7 @@ struct MemWrittenTracker
/* handle is a pointer to a MemWrittenTracker. Assumes its pointer is valid. */
static BOOL CRYPT_MemOutputFunc(void *handle, const void *buffer, DWORD size)
{
struct MemWrittenTracker *tracker = (struct MemWrittenTracker *)handle;
struct MemWrittenTracker *tracker = handle;
BOOL ret;
if (tracker->written + size > tracker->cbData)
@ -797,7 +797,7 @@ static BOOL CRYPT_CountSerializedBytes(void *handle, const void *buffer,
static BOOL CRYPT_SaveSerializedToMem(HCERTSTORE store,
DWORD dwMsgAndCertEncodingType, void *handle)
{
CERT_BLOB *blob = (CERT_BLOB *)handle;
CERT_BLOB *blob = handle;
DWORD size = 0;
BOOL ret;
@ -864,11 +864,11 @@ BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType,
closeFile = FALSE;
break;
case CERT_STORE_SAVE_TO_FILENAME_A:
handle = CreateFileA((LPCSTR)pvSaveToPara, GENERIC_WRITE, 0, NULL,
handle = CreateFileA(pvSaveToPara, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, 0, NULL);
break;
case CERT_STORE_SAVE_TO_FILENAME_W:
handle = CreateFileW((LPCWSTR)pvSaveToPara, GENERIC_WRITE, 0, NULL,
handle = CreateFileW(pvSaveToPara, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, 0, NULL);
break;
case CERT_STORE_SAVE_TO_MEMORY:

View File

@ -273,7 +273,7 @@ static BOOL CRYPT_MemDeleteCtl(PWINECRYPT_CERTSTORE store, void *pCtlContext)
static void WINAPI CRYPT_MemCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
{
WINE_MEMSTORE *store = (WINE_MEMSTORE *)hCertStore;
WINE_MEMSTORE *store = hCertStore;
TRACE("(%p, %08x)\n", store, dwFlags);
if (dwFlags)
@ -335,14 +335,14 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara)
{
static const WCHAR fmt[] = { '%','s','\\','%','s',0 };
LPCWSTR storeName = (LPCWSTR)pvPara;
LPCWSTR storeName = pvPara;
LPWSTR storePath;
PWINECRYPT_CERTSTORE store = NULL;
HKEY root;
LPCWSTR base;
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
debugstr_w((LPCWSTR)pvPara));
debugstr_w(pvPara));
if (!pvPara)
{
@ -450,21 +450,21 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreA(HCRYPTPROV hCryptProv,
PWINECRYPT_CERTSTORE ret = NULL;
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
debugstr_a((LPCSTR)pvPara));
debugstr_a(pvPara));
if (!pvPara)
{
SetLastError(ERROR_FILE_NOT_FOUND);
return NULL;
}
len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, NULL, 0);
len = MultiByteToWideChar(CP_ACP, 0, pvPara, -1, NULL, 0);
if (len)
{
LPWSTR storeName = CryptMemAlloc(len * sizeof(WCHAR));
if (storeName)
{
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, storeName, len);
MultiByteToWideChar(CP_ACP, 0, pvPara, -1, storeName, len);
ret = CRYPT_SysRegOpenStoreW(hCryptProv, dwFlags, storeName);
CryptMemFree(storeName);
}
@ -479,7 +479,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
BOOL ret;
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
debugstr_w((LPCWSTR)pvPara));
debugstr_w(pvPara));
if (!pvPara)
{
@ -541,7 +541,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
CryptReleaseContext(hCryptProv, 0);
}
}
return (PWINECRYPT_CERTSTORE)store;
return store;
}
static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv,
@ -551,21 +551,21 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv,
PWINECRYPT_CERTSTORE ret = NULL;
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
debugstr_a((LPCSTR)pvPara));
debugstr_a(pvPara));
if (!pvPara)
{
SetLastError(ERROR_FILE_NOT_FOUND);
return NULL;
}
len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, NULL, 0);
len = MultiByteToWideChar(CP_ACP, 0, pvPara, -1, NULL, 0);
if (len)
{
LPWSTR storeName = CryptMemAlloc(len * sizeof(WCHAR));
if (storeName)
{
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pvPara, -1, storeName, len);
MultiByteToWideChar(CP_ACP, 0, pvPara, -1, storeName, len);
ret = CRYPT_SysOpenStoreW(hCryptProv, dwFlags, storeName);
CryptMemFree(storeName);
}
@ -669,7 +669,7 @@ static PWINECRYPT_CERTSTORE CRYPT_PKCSOpenStore(HCRYPTPROV hCryptProv,
{
HCRYPTMSG msg;
PWINECRYPT_CERTSTORE store = NULL;
const CRYPT_DATA_BLOB *data = (const CRYPT_DATA_BLOB *)pvPara;
const CRYPT_DATA_BLOB *data = pvPara;
BOOL ret;
DWORD msgOpenFlags = dwFlags & CERT_STORE_NO_CRYPT_RELEASE_FLAG ? 0 :
CMSG_CRYPT_RELEASE_CONTEXT_FLAG;
@ -712,7 +712,7 @@ static PWINECRYPT_CERTSTORE CRYPT_PhysOpenStoreW(HCRYPTPROV hCryptProv,
FIXME("(%ld, %08x, %p): stub\n", hCryptProv, dwFlags, pvPara);
else
FIXME("(%ld, %08x, %s): stub\n", hCryptProv, dwFlags,
debugstr_w((LPCWSTR)pvPara));
debugstr_w(pvPara));
return NULL;
}
@ -795,7 +795,7 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider,
hCryptProv, dwFlags, pvPara);
else
hcs = openFunc(hCryptProv, dwFlags, pvPara);
return (HCERTSTORE)hcs;
return hcs;
}
HCERTSTORE WINAPI CertOpenSystemStoreA(HCRYPTPROV_LEGACY hProv,
@ -829,7 +829,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
PCCERT_CONTEXT pCertContext, DWORD dwAddDisposition,
PCCERT_CONTEXT *ppStoreContext)
{
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
PWINECRYPT_CERTSTORE store = hCertStore;
BOOL ret = TRUE;
PCCERT_CONTEXT toAdd = NULL, existing = NULL;
@ -944,7 +944,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
PCCERT_CONTEXT WINAPI CertEnumCertificatesInStore(HCERTSTORE hCertStore,
PCCERT_CONTEXT pPrev)
{
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
WINECRYPT_CERTSTORE *hcs = hCertStore;
PCCERT_CONTEXT ret;
TRACE("(%p, %p)\n", hCertStore, pPrev);
@ -972,8 +972,7 @@ BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT pCertContext)
}
else
{
PWINECRYPT_CERTSTORE hcs =
(PWINECRYPT_CERTSTORE)pCertContext->hCertStore;
PWINECRYPT_CERTSTORE hcs = pCertContext->hCertStore;
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
ret = FALSE;
@ -991,7 +990,7 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
PCCRL_CONTEXT pCrlContext, DWORD dwAddDisposition,
PCCRL_CONTEXT* ppStoreContext)
{
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
PWINECRYPT_CERTSTORE store = hCertStore;
BOOL ret = TRUE;
PCCRL_CONTEXT toAdd = NULL, existing = NULL;
@ -1111,8 +1110,7 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
}
else
{
PWINECRYPT_CERTSTORE hcs =
(PWINECRYPT_CERTSTORE)pCrlContext->hCertStore;
PWINECRYPT_CERTSTORE hcs = pCrlContext->hCertStore;
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
ret = FALSE;
@ -1126,7 +1124,7 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
PCCRL_CONTEXT WINAPI CertEnumCRLsInStore(HCERTSTORE hCertStore,
PCCRL_CONTEXT pPrev)
{
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
WINECRYPT_CERTSTORE *hcs = hCertStore;
PCCRL_CONTEXT ret;
TRACE("(%p, %p)\n", hCertStore, pPrev);
@ -1141,7 +1139,7 @@ PCCRL_CONTEXT WINAPI CertEnumCRLsInStore(HCERTSTORE hCertStore,
HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
{
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
WINECRYPT_CERTSTORE *hcs = hCertStore;
TRACE("(%p)\n", hCertStore);
@ -1152,7 +1150,7 @@ HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
{
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *) hCertStore;
WINECRYPT_CERTSTORE *hcs = hCertStore;
TRACE("(%p, %08x)\n", hCertStore, dwFlags);
@ -1176,7 +1174,7 @@ BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags,
DWORD dwCtrlType, void const *pvCtrlPara)
{
WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
WINECRYPT_CERTSTORE *hcs = hCertStore;
BOOL ret;
TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType,
@ -1199,7 +1197,7 @@ BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags,
BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
void *pvData, DWORD *pcbData)
{
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
PWINECRYPT_CERTSTORE store = hCertStore;
BOOL ret = FALSE;
TRACE("(%p, %d, %p, %p)\n", hCertStore, dwPropId, pvData, pcbData);
@ -1263,7 +1261,7 @@ BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
DWORD dwFlags, const void *pvData)
{
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
PWINECRYPT_CERTSTORE store = hCertStore;
BOOL ret = FALSE;
TRACE("(%p, %d, %08x, %p)\n", hCertStore, dwPropId, dwFlags, pvData);
@ -1278,7 +1276,7 @@ BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
default:
if (pvData)
{
const CRYPT_DATA_BLOB *blob = (const CRYPT_DATA_BLOB *)pvData;
const CRYPT_DATA_BLOB *blob = pvData;
ret = ContextPropertyList_SetProperty(store->properties, dwPropId,
blob->pbData, blob->cbData);
@ -1392,7 +1390,7 @@ BOOL WINAPI CertEnumPhysicalStore(const void *pvSystemStore, DWORD dwFlags,
FIXME("(%p, %08x, %p, %p): stub\n", pvSystemStore, dwFlags, pvArg,
pfnEnum);
else
FIXME("(%s, %08x, %p, %p): stub\n", debugstr_w((LPCWSTR)pvSystemStore),
FIXME("(%s, %08x, %p, %p): stub\n", debugstr_w(pvSystemStore),
dwFlags, pvArg,
pfnEnum);
return FALSE;