Commit 28e1ec44 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

crypt32: Constify some variables.

parent 761f5ca1
...@@ -134,7 +134,7 @@ static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store, ...@@ -134,7 +134,7 @@ static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store,
* Assumes the collection store's lock is held. * Assumes the collection store's lock is held.
*/ */
static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store, static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store,
PWINE_STORE_LIST_ENTRY storeEntry, PCONTEXT_FUNCS contextFuncs, PWINE_STORE_LIST_ENTRY storeEntry, const CONTEXT_FUNCS *contextFuncs,
PCWINE_CONTEXT_INTERFACE contextInterface, void *pPrev, size_t contextSize) PCWINE_CONTEXT_INTERFACE contextInterface, void *pPrev, size_t contextSize)
{ {
void *ret, *child; void *ret, *child;
...@@ -165,7 +165,7 @@ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store, ...@@ -165,7 +165,7 @@ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store,
/* We always want the same function pointers (from certs, crls) /* We always want the same function pointers (from certs, crls)
* in the next store, so use the same offset into the next store. * in the next store, so use the same offset into the next store.
*/ */
size_t offset = (LPBYTE)contextFuncs - (LPBYTE)storeEntry->store; size_t offset = (const BYTE *)contextFuncs - (LPBYTE)storeEntry->store;
PWINE_STORE_LIST_ENTRY storeNextEntry = PWINE_STORE_LIST_ENTRY storeNextEntry =
LIST_ENTRY(storeNext, WINE_STORE_LIST_ENTRY, entry); LIST_ENTRY(storeNext, WINE_STORE_LIST_ENTRY, entry);
PCONTEXT_FUNCS storeNextContexts = PCONTEXT_FUNCS storeNextContexts =
......
...@@ -106,7 +106,7 @@ BOOL CRYPT_AsnDecodeCMSSignedInfo(const BYTE *pbEncoded, DWORD cbEncoded, ...@@ -106,7 +106,7 @@ BOOL CRYPT_AsnDecodeCMSSignedInfo(const BYTE *pbEncoded, DWORD cbEncoded,
* If CRYPT_ENCODE_ALLOC_FLAG is set in dwFlags, *pbEncoded will be set to a * If CRYPT_ENCODE_ALLOC_FLAG is set in dwFlags, *pbEncoded will be set to a
* pointer to the newly allocated memory. * pointer to the newly allocated memory.
*/ */
BOOL CRYPT_EncodeEnsureSpace(DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BOOL CRYPT_EncodeEnsureSpace(DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara,
BYTE *pbEncoded, DWORD *pcbEncoded, DWORD bytesNeeded); BYTE *pbEncoded, DWORD *pcbEncoded, DWORD bytesNeeded);
BOOL CRYPT_AsnDecodePKCSDigestedData(const BYTE *pbEncoded, DWORD cbEncoded, BOOL CRYPT_AsnDecodePKCSDigestedData(const BYTE *pbEncoded, DWORD cbEncoded,
......
...@@ -205,7 +205,7 @@ static BOOL CRYPT_GetLen(const BYTE *pbEncoded, DWORD cbEncoded, DWORD *len) ...@@ -205,7 +205,7 @@ static BOOL CRYPT_GetLen(const BYTE *pbEncoded, DWORD cbEncoded, DWORD *len)
* pointer to the newly allocated memory. * pointer to the newly allocated memory.
*/ */
static BOOL CRYPT_DecodeEnsureSpace(DWORD dwFlags, static BOOL CRYPT_DecodeEnsureSpace(DWORD dwFlags,
PCRYPT_DECODE_PARA pDecodePara, void *pvStructInfo, DWORD *pcbStructInfo, const CRYPT_DECODE_PARA *pDecodePara, void *pvStructInfo, DWORD *pcbStructInfo,
DWORD bytesNeeded) DWORD bytesNeeded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
...@@ -232,7 +232,7 @@ static BOOL CRYPT_DecodeEnsureSpace(DWORD dwFlags, ...@@ -232,7 +232,7 @@ static BOOL CRYPT_DecodeEnsureSpace(DWORD dwFlags,
return ret; return ret;
} }
static void CRYPT_FreeSpace(PCRYPT_DECODE_PARA pDecodePara, LPVOID pv) static void CRYPT_FreeSpace(const CRYPT_DECODE_PARA *pDecodePara, LPVOID pv)
{ {
if (pDecodePara && pDecodePara->pfnFree) if (pDecodePara && pDecodePara->pfnFree)
pDecodePara->pfnFree(pv); pDecodePara->pfnFree(pv);
...@@ -611,7 +611,7 @@ struct AsnArrayItemSize ...@@ -611,7 +611,7 @@ struct AsnArrayItemSize
*/ */
static BOOL CRYPT_AsnDecodeArray(const struct AsnArrayDescriptor *arrayDesc, static BOOL CRYPT_AsnDecodeArray(const struct AsnArrayDescriptor *arrayDesc,
const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags,
PCRYPT_DECODE_PARA pDecodePara, void *pvStructInfo, DWORD *pcbStructInfo, const CRYPT_DECODE_PARA *pDecodePara, void *pvStructInfo, DWORD *pcbStructInfo,
DWORD *pcbDecoded) DWORD *pcbDecoded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
......
...@@ -100,7 +100,7 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSAttributes(DWORD dwCertEncodingType, ...@@ -100,7 +100,7 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSAttributes(DWORD dwCertEncodingType,
LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags, LPCSTR lpszStructType, const void *pvStructInfo, DWORD dwFlags,
PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded); PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD *pcbEncoded);
BOOL CRYPT_EncodeEnsureSpace(DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BOOL CRYPT_EncodeEnsureSpace(DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara,
BYTE *pbEncoded, DWORD *pcbEncoded, DWORD bytesNeeded) BYTE *pbEncoded, DWORD *pcbEncoded, DWORD bytesNeeded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
...@@ -910,7 +910,7 @@ BOOL WINAPI CRYPT_AsnEncodeOid(DWORD dwCertEncodingType, ...@@ -910,7 +910,7 @@ BOOL WINAPI CRYPT_AsnEncodeOid(DWORD dwCertEncodingType,
} }
static BOOL CRYPT_AsnEncodeStringCoerce(const CERT_NAME_VALUE *value, static BOOL CRYPT_AsnEncodeStringCoerce(const CERT_NAME_VALUE *value,
BYTE tag, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, BYTE tag, DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara, BYTE *pbEncoded,
DWORD *pcbEncoded) DWORD *pcbEncoded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
...@@ -939,7 +939,7 @@ static BOOL CRYPT_AsnEncodeStringCoerce(const CERT_NAME_VALUE *value, ...@@ -939,7 +939,7 @@ static BOOL CRYPT_AsnEncodeStringCoerce(const CERT_NAME_VALUE *value,
} }
static BOOL CRYPT_AsnEncodeBMPString(const CERT_NAME_VALUE *value, static BOOL CRYPT_AsnEncodeBMPString(const CERT_NAME_VALUE *value,
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara, BYTE *pbEncoded,
DWORD *pcbEncoded) DWORD *pcbEncoded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
...@@ -979,7 +979,7 @@ static BOOL CRYPT_AsnEncodeBMPString(const CERT_NAME_VALUE *value, ...@@ -979,7 +979,7 @@ static BOOL CRYPT_AsnEncodeBMPString(const CERT_NAME_VALUE *value,
} }
static BOOL CRYPT_AsnEncodeUTF8String(const CERT_NAME_VALUE *value, static BOOL CRYPT_AsnEncodeUTF8String(const CERT_NAME_VALUE *value,
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara, BYTE *pbEncoded,
DWORD *pcbEncoded) DWORD *pcbEncoded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
...@@ -1940,7 +1940,7 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSContentInfo(DWORD dwCertEncodingType, ...@@ -1940,7 +1940,7 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSContentInfo(DWORD dwCertEncodingType,
} }
static BOOL CRYPT_AsnEncodeUnicodeStringCoerce(const CERT_NAME_VALUE *value, static BOOL CRYPT_AsnEncodeUnicodeStringCoerce(const CERT_NAME_VALUE *value,
BYTE tag, DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, BYTE tag, DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara, BYTE *pbEncoded,
DWORD *pcbEncoded) DWORD *pcbEncoded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
...@@ -1972,7 +1972,7 @@ static BOOL CRYPT_AsnEncodeUnicodeStringCoerce(const CERT_NAME_VALUE *value, ...@@ -1972,7 +1972,7 @@ static BOOL CRYPT_AsnEncodeUnicodeStringCoerce(const CERT_NAME_VALUE *value,
return ret; return ret;
} }
static void CRYPT_FreeSpace(PCRYPT_ENCODE_PARA pEncodePara, LPVOID pv) static void CRYPT_FreeSpace(const CRYPT_ENCODE_PARA *pEncodePara, LPVOID pv)
{ {
if (pEncodePara && pEncodePara->pfnFree) if (pEncodePara && pEncodePara->pfnFree)
pEncodePara->pfnFree(pv); pEncodePara->pfnFree(pv);
...@@ -1981,7 +1981,7 @@ static void CRYPT_FreeSpace(PCRYPT_ENCODE_PARA pEncodePara, LPVOID pv) ...@@ -1981,7 +1981,7 @@ static void CRYPT_FreeSpace(PCRYPT_ENCODE_PARA pEncodePara, LPVOID pv)
} }
static BOOL CRYPT_AsnEncodeNumericString(const CERT_NAME_VALUE *value, static BOOL CRYPT_AsnEncodeNumericString(const CERT_NAME_VALUE *value,
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara, BYTE *pbEncoded,
DWORD *pcbEncoded) DWORD *pcbEncoded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
...@@ -2035,7 +2035,7 @@ static inline int isprintableW(WCHAR wc) ...@@ -2035,7 +2035,7 @@ static inline int isprintableW(WCHAR wc)
} }
static BOOL CRYPT_AsnEncodePrintableString(const CERT_NAME_VALUE *value, static BOOL CRYPT_AsnEncodePrintableString(const CERT_NAME_VALUE *value,
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara, BYTE *pbEncoded,
DWORD *pcbEncoded) DWORD *pcbEncoded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
...@@ -2082,7 +2082,7 @@ static BOOL CRYPT_AsnEncodePrintableString(const CERT_NAME_VALUE *value, ...@@ -2082,7 +2082,7 @@ static BOOL CRYPT_AsnEncodePrintableString(const CERT_NAME_VALUE *value,
} }
static BOOL CRYPT_AsnEncodeIA5String(const CERT_NAME_VALUE *value, static BOOL CRYPT_AsnEncodeIA5String(const CERT_NAME_VALUE *value,
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara, BYTE *pbEncoded,
DWORD *pcbEncoded) DWORD *pcbEncoded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
...@@ -2129,7 +2129,7 @@ static BOOL CRYPT_AsnEncodeIA5String(const CERT_NAME_VALUE *value, ...@@ -2129,7 +2129,7 @@ static BOOL CRYPT_AsnEncodeIA5String(const CERT_NAME_VALUE *value,
} }
static BOOL CRYPT_AsnEncodeUniversalString(const CERT_NAME_VALUE *value, static BOOL CRYPT_AsnEncodeUniversalString(const CERT_NAME_VALUE *value,
DWORD dwFlags, PCRYPT_ENCODE_PARA pEncodePara, BYTE *pbEncoded, DWORD dwFlags, const CRYPT_ENCODE_PARA *pEncodePara, BYTE *pbEncoded,
DWORD *pcbEncoded) DWORD *pcbEncoded)
{ {
BOOL ret = TRUE; BOOL ret = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment