Commit 9f6a6427 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

crypt32: Constify some variables.

parent fbbe0039
...@@ -76,7 +76,7 @@ static void CRYPT_guid2wstr( const GUID *guid, LPWSTR wstr ) ...@@ -76,7 +76,7 @@ static void CRYPT_guid2wstr( const GUID *guid, LPWSTR wstr )
* *
* Helper function for CryptSIPRemoveProvider * Helper function for CryptSIPRemoveProvider
*/ */
static LONG CRYPT_SIPDeleteFunction( LPGUID guid, LPCWSTR szKey ) static LONG CRYPT_SIPDeleteFunction( const GUID *guid, LPCWSTR szKey )
{ {
WCHAR szFullKey[ 0x100 ]; WCHAR szFullKey[ 0x100 ];
LONG r = ERROR_SUCCESS; LONG r = ERROR_SUCCESS;
...@@ -150,7 +150,7 @@ BOOL WINAPI CryptSIPRemoveProvider(GUID *pgProv) ...@@ -150,7 +150,7 @@ BOOL WINAPI CryptSIPRemoveProvider(GUID *pgProv)
* Add a registry key containing a dll name and function under * Add a registry key containing a dll name and function under
* "Software\\Microsoft\\Cryptography\\OID\\EncodingType 0\\<func>\\<guid>" * "Software\\Microsoft\\Cryptography\\OID\\EncodingType 0\\<func>\\<guid>"
*/ */
static LONG CRYPT_SIPWriteFunction( LPGUID guid, LPCWSTR szKey, static LONG CRYPT_SIPWriteFunction( const GUID *guid, LPCWSTR szKey,
LPCWSTR szDll, LPCWSTR szFunction ) LPCWSTR szDll, LPCWSTR szFunction )
{ {
WCHAR szFullKey[ 0x100 ]; WCHAR szFullKey[ 0x100 ];
......
...@@ -838,7 +838,7 @@ static BOOL WINAPI CRYPT_ProvControl(HCERTSTORE hCertStore, DWORD dwFlags, ...@@ -838,7 +838,7 @@ static BOOL WINAPI CRYPT_ProvControl(HCERTSTORE hCertStore, DWORD dwFlags,
} }
static PWINECRYPT_CERTSTORE CRYPT_ProvCreateStore(HCRYPTPROV hCryptProv, static PWINECRYPT_CERTSTORE CRYPT_ProvCreateStore(HCRYPTPROV hCryptProv,
DWORD dwFlags, PWINECRYPT_CERTSTORE memStore, PCERT_STORE_PROV_INFO pProvInfo) DWORD dwFlags, PWINECRYPT_CERTSTORE memStore, const CERT_STORE_PROV_INFO *pProvInfo)
{ {
PWINE_PROVIDERSTORE ret = (PWINE_PROVIDERSTORE)CryptMemAlloc( PWINE_PROVIDERSTORE ret = (PWINE_PROVIDERSTORE)CryptMemAlloc(
sizeof(WINE_PROVIDERSTORE)); sizeof(WINE_PROVIDERSTORE));
...@@ -946,7 +946,7 @@ static PWINECRYPT_CERTSTORE CRYPT_ProvOpenStore(LPCSTR lpszStoreProvider, ...@@ -946,7 +946,7 @@ static PWINECRYPT_CERTSTORE CRYPT_ProvOpenStore(LPCSTR lpszStoreProvider,
return ret; return ret;
} }
static void CRYPT_HashToStr(LPBYTE hash, LPWSTR asciiHash) static void CRYPT_HashToStr(const BYTE *hash, LPWSTR asciiHash)
{ {
static const WCHAR fmt[] = { '%','0','2','X',0 }; static const WCHAR fmt[] = { '%','0','2','X',0 };
DWORD i; DWORD i;
...@@ -964,7 +964,7 @@ static const WCHAR CRLsW[] = { 'C','R','L','s',0 }; ...@@ -964,7 +964,7 @@ static const WCHAR CRLsW[] = { 'C','R','L','s',0 };
static const WCHAR CTLsW[] = { 'C','T','L','s',0 }; static const WCHAR CTLsW[] = { 'C','T','L','s',0 };
static const WCHAR BlobW[] = { 'B','l','o','b',0 }; static const WCHAR BlobW[] = { 'B','l','o','b',0 };
static void CRYPT_RegReadSerializedFromReg(PWINE_REGSTOREINFO store, HKEY key, static void CRYPT_RegReadSerializedFromReg(const WINE_REGSTOREINFO *store, HKEY key,
DWORD contextType) DWORD contextType)
{ {
LONG rc; LONG rc;
...@@ -1057,7 +1057,7 @@ static void CRYPT_RegReadSerializedFromReg(PWINE_REGSTOREINFO store, HKEY key, ...@@ -1057,7 +1057,7 @@ static void CRYPT_RegReadSerializedFromReg(PWINE_REGSTOREINFO store, HKEY key,
} while (!rc); } while (!rc);
} }
static void CRYPT_RegReadFromReg(PWINE_REGSTOREINFO store) static void CRYPT_RegReadFromReg(const WINE_REGSTOREINFO *store)
{ {
static const WCHAR * const subKeys[] = { CertsW, CRLsW, CTLsW }; static const WCHAR * const subKeys[] = { CertsW, CRLsW, CTLsW };
static const DWORD contextFlags[] = { CERT_STORE_CERTIFICATE_CONTEXT_FLAG, static const DWORD contextFlags[] = { CERT_STORE_CERTIFICATE_CONTEXT_FLAG,
...@@ -1080,7 +1080,7 @@ static void CRYPT_RegReadFromReg(PWINE_REGSTOREINFO store) ...@@ -1080,7 +1080,7 @@ static void CRYPT_RegReadFromReg(PWINE_REGSTOREINFO store)
} }
/* Hash is assumed to be 20 bytes in length (a SHA-1 hash) */ /* Hash is assumed to be 20 bytes in length (a SHA-1 hash) */
static BOOL CRYPT_WriteSerializedToReg(HKEY key, LPBYTE hash, LPBYTE buf, static BOOL CRYPT_WriteSerializedToReg(HKEY key, const BYTE *hash, const BYTE *buf,
DWORD len) DWORD len)
{ {
WCHAR asciiHash[20 * 2 + 1]; WCHAR asciiHash[20 * 2 + 1];
......
...@@ -482,7 +482,7 @@ struct X500TokenW ...@@ -482,7 +482,7 @@ struct X500TokenW
}; };
static void CRYPT_KeynameKeeperFromTokenW(struct KeynameKeeper *keeper, static void CRYPT_KeynameKeeperFromTokenW(struct KeynameKeeper *keeper,
struct X500TokenW *key) const struct X500TokenW *key)
{ {
DWORD len = key->end - key->start; DWORD len = key->end - key->start;
...@@ -593,7 +593,7 @@ static DWORD CRYPT_GetNextValueW(LPCWSTR str, DWORD dwFlags, LPCWSTR separators, ...@@ -593,7 +593,7 @@ static DWORD CRYPT_GetNextValueW(LPCWSTR str, DWORD dwFlags, LPCWSTR separators,
* output's pbData must be freed with LocalFree. * output's pbData must be freed with LocalFree.
*/ */
static BOOL CRYPT_EncodeValueWithType(DWORD dwCertEncodingType, static BOOL CRYPT_EncodeValueWithType(DWORD dwCertEncodingType,
struct X500TokenW *value, PCERT_NAME_BLOB output, DWORD type, const struct X500TokenW *value, PCERT_NAME_BLOB output, DWORD type,
LPCWSTR *ppszError) LPCWSTR *ppszError)
{ {
CERT_NAME_VALUE nameValue = { type, { 0, NULL } }; CERT_NAME_VALUE nameValue = { type, { 0, NULL } };
...@@ -634,7 +634,7 @@ static BOOL CRYPT_EncodeValueWithType(DWORD dwCertEncodingType, ...@@ -634,7 +634,7 @@ static BOOL CRYPT_EncodeValueWithType(DWORD dwCertEncodingType,
} }
static BOOL CRYPT_EncodeValue(DWORD dwCertEncodingType, static BOOL CRYPT_EncodeValue(DWORD dwCertEncodingType,
struct X500TokenW *value, PCERT_NAME_BLOB output, const DWORD *types, const struct X500TokenW *value, PCERT_NAME_BLOB output, const DWORD *types,
LPCWSTR *ppszError) LPCWSTR *ppszError)
{ {
DWORD i; DWORD i;
......
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