crypt32: Constify some variables (2 of 2)

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Apr 14 12:12:40 CDT 2007


Changelog:
    crypt32: Constify some variables.

diff -urN a/dlls/crypt32/sip.c b/dlls/crypt32/sip.c
--- a/dlls/crypt32/sip.c	2006-10-31 11:45:01.000000000 +0000
+++ b/dlls/crypt32/sip.c	2007-04-14 17:07:23.000000000 +0100
@@ -76,7 +76,7 @@
  *
  * Helper function for CryptSIPRemoveProvider
  */
-static LONG CRYPT_SIPDeleteFunction( LPGUID guid, LPCWSTR szKey )
+static LONG CRYPT_SIPDeleteFunction( const GUID *guid, LPCWSTR szKey )
 {
     WCHAR szFullKey[ 0x100 ];
     LONG r = ERROR_SUCCESS;
@@ -150,7 +150,7 @@
  * Add a registry key containing a dll name and function under
  *  "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 )
 {
     WCHAR szFullKey[ 0x100 ];
diff -urN a/dlls/crypt32/store.c b/dlls/crypt32/store.c
--- a/dlls/crypt32/store.c	2007-03-12 13:30:31.000000000 +0000
+++ b/dlls/crypt32/store.c	2007-04-14 17:45:20.000000000 +0100
@@ -838,7 +838,7 @@
 }
 
 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(
      sizeof(WINE_PROVIDERSTORE));
@@ -946,7 +946,7 @@
     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 };
     DWORD i;
@@ -964,7 +964,7 @@
 static const WCHAR CTLsW[] = { 'C','T','L','s',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)
 {
     LONG rc;
@@ -1057,7 +1057,7 @@
     } 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 DWORD contextFlags[] = { CERT_STORE_CERTIFICATE_CONTEXT_FLAG,
@@ -1080,7 +1080,7 @@
 }
 
 /* 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)
 {
     WCHAR asciiHash[20 * 2 + 1];
diff -urN a/dlls/crypt32/str.c b/dlls/crypt32/str.c
--- a/dlls/crypt32/str.c	2006-10-04 10:26:38.000000000 +0100
+++ b/dlls/crypt32/str.c	2007-04-14 17:52:07.000000000 +0100
@@ -482,7 +482,7 @@
 };
 
 static void CRYPT_KeynameKeeperFromTokenW(struct KeynameKeeper *keeper,
- struct X500TokenW *key)
+ const struct X500TokenW *key)
 {
     DWORD len = key->end - key->start;
 
@@ -593,7 +593,7 @@
  * output's pbData must be freed with LocalFree.
  */
 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)
 {
     CERT_NAME_VALUE nameValue = { type, { 0, NULL } };
@@ -634,7 +634,7 @@
 }
 
 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)
 {
     DWORD i;



More information about the wine-patches mailing list