secur32: Constify some variables
Andrew Talbot
andrew.talbot at talbotville.com
Sat Aug 25 16:21:07 CDT 2007
Changelog:
secur32: Constify some variables.
diff -urN a/dlls/secur32/hmac_md5.c b/dlls/secur32/hmac_md5.c
--- a/dlls/secur32/hmac_md5.c 2006-10-16 11:31:31.000000000 +0100
+++ b/dlls/secur32/hmac_md5.c 2007-08-25 18:59:05.000000000 +0100
@@ -21,7 +21,7 @@
#include "hmac_md5.h"
-void HMACMD5Init(HMAC_MD5_CTX *ctx, unsigned char *key, unsigned int key_len)
+void HMACMD5Init(HMAC_MD5_CTX *ctx, const unsigned char *key, unsigned int key_len)
{
int i;
unsigned char inner_padding[64];
@@ -55,7 +55,7 @@
MD5Update(&(ctx->ctx), inner_padding, 64);
}
-void HMACMD5Update(HMAC_MD5_CTX *ctx, unsigned char *data, unsigned int data_len)
+void HMACMD5Update(HMAC_MD5_CTX *ctx, const unsigned char *data, unsigned int data_len)
{
MD5Update(&(ctx->ctx), data, data_len);
}
diff -urN a/dlls/secur32/hmac_md5.h b/dlls/secur32/hmac_md5.h
--- a/dlls/secur32/hmac_md5.h 2006-11-09 12:10:43.000000000 +0000
+++ b/dlls/secur32/hmac_md5.h 2007-08-25 18:59:20.000000000 +0100
@@ -42,7 +42,7 @@
void WINAPI MD5Update( MD5_CTX *ctx, const unsigned char *buf, unsigned int len );
void WINAPI MD5Final( MD5_CTX *ctx );
-void HMACMD5Init(HMAC_MD5_CTX *ctx, unsigned char *key, unsigned int key_len);
-void HMACMD5Update(HMAC_MD5_CTX *ctx, unsigned char *data, unsigned int data_len);
+void HMACMD5Init(HMAC_MD5_CTX *ctx, const unsigned char *key, unsigned int key_len);
+void HMACMD5Update(HMAC_MD5_CTX *ctx, const unsigned char *data, unsigned int data_len);
void HMACMD5Final(HMAC_MD5_CTX *ctx, unsigned char *digest);
#endif /*_HMAC_MD5_H_*/
diff -urN a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
--- a/dlls/secur32/schannel.c 2006-12-14 20:25:15.000000000 +0000
+++ b/dlls/secur32/schannel.c 2007-08-25 19:14:34.000000000 +0100
@@ -29,7 +29,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
static SECURITY_STATUS schan_QueryCredentialsAttributes(
- PCredHandle phCredential, ULONG ulAttribute, PVOID pBuffer)
+ PCredHandle phCredential, ULONG ulAttribute, const VOID *pBuffer)
{
SECURITY_STATUS ret;
@@ -111,7 +111,7 @@
return ret;
}
-static SECURITY_STATUS schan_CheckCreds(PSCHANNEL_CRED schanCred)
+static SECURITY_STATUS schan_CheckCreds(const SCHANNEL_CRED *schanCred)
{
SECURITY_STATUS st;
@@ -149,7 +149,7 @@
return st;
}
-static SECURITY_STATUS schan_AcquireClientCredentials(PSCHANNEL_CRED schanCred,
+static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schanCred,
PCredHandle phCredential, PTimeStamp ptsExpiry)
{
SECURITY_STATUS st = SEC_E_OK;
@@ -177,7 +177,7 @@
return st;
}
-static SECURITY_STATUS schan_AcquireServerCredentials(PSCHANNEL_CRED schanCred,
+static SECURITY_STATUS schan_AcquireServerCredentials(const SCHANNEL_CRED *schanCred,
PCredHandle phCredential, PTimeStamp ptsExpiry)
{
SECURITY_STATUS st;
@@ -194,7 +194,7 @@
}
static SECURITY_STATUS schan_AcquireCredentialsHandle(ULONG fCredentialUse,
- PSCHANNEL_CRED schanCred, PCredHandle phCredential, PTimeStamp ptsExpiry)
+ const SCHANNEL_CRED *schanCred, PCredHandle phCredential, PTimeStamp ptsExpiry)
{
SECURITY_STATUS ret;
diff -urN a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c
--- a/dlls/secur32/secur32.c 2007-05-25 20:45:29.000000000 +0100
+++ b/dlls/secur32/secur32.c 2007-08-25 19:00:08.000000000 +0100
@@ -588,7 +588,7 @@
}
}
-SecurePackage *SECUR32_findPackageW(PWSTR packageName)
+SecurePackage *SECUR32_findPackageW(PCWSTR packageName)
{
SecurePackage *ret = NULL;
BOOL matched = FALSE;
@@ -634,7 +634,7 @@
return ret;
}
-SecurePackage *SECUR32_findPackageA(PSTR packageName)
+SecurePackage *SECUR32_findPackageA(PCSTR packageName)
{
SecurePackage *ret;
@@ -778,7 +778,7 @@
* structures) into an array of SecPkgInfoA structures, which it returns.
*/
static PSecPkgInfoA thunk_PSecPkgInfoWToA(ULONG cPackages,
- const PSecPkgInfoW info)
+ const SecPkgInfoW *info)
{
PSecPkgInfoA ret;
diff -urN a/dlls/secur32/secur32_priv.h b/dlls/secur32/secur32_priv.h
--- a/dlls/secur32/secur32_priv.h 2007-08-08 17:37:10.000000000 +0100
+++ b/dlls/secur32/secur32_priv.h 2007-08-25 19:00:26.000000000 +0100
@@ -112,11 +112,11 @@
/* Tries to find the package named packageName. If it finds it, implicitly
* loads the package if it isn't already loaded.
*/
-SecurePackage *SECUR32_findPackageW(PWSTR packageName);
+SecurePackage *SECUR32_findPackageW(PCWSTR packageName);
/* Tries to find the package named packageName. (Thunks to _findPackageW)
*/
-SecurePackage *SECUR32_findPackageA(PSTR packageName);
+SecurePackage *SECUR32_findPackageA(PCSTR packageName);
/* A few string helpers; will return NULL if str is NULL. Free return with
* SECUR32_FREE */
diff -urN a/dlls/secur32/thunks.c b/dlls/secur32/thunks.c
--- a/dlls/secur32/thunks.c 2007-05-21 15:41:57.000000000 +0100
+++ b/dlls/secur32/thunks.c 2007-08-25 19:00:41.000000000 +0100
@@ -351,7 +351,7 @@
return ret;
}
-static PSecPkgInfoA _copyPackageInfoFlatWToA(PSecPkgInfoW infoW)
+static PSecPkgInfoA _copyPackageInfoFlatWToA(const SecPkgInfoW *infoW)
{
PSecPkgInfoA ret;
@@ -576,7 +576,7 @@
return ret;
}
-static PSecPkgInfoW _copyPackageInfoFlatAToW(PSecPkgInfoA infoA)
+static PSecPkgInfoW _copyPackageInfoFlatAToW(const SecPkgInfoA *infoA)
{
PSecPkgInfoW ret;
diff -urN a/dlls/secur32/util.c b/dlls/secur32/util.c
--- a/dlls/secur32/util.c 2007-05-21 15:41:57.000000000 +0100
+++ b/dlls/secur32/util.c 2007-08-25 19:00:54.000000000 +0100
@@ -143,7 +143,7 @@
return SEC_E_OK;
}
-static void SECUR32_CalcNTLMv2Subkey(PBYTE session_key, const char *magic, PBYTE subkey)
+static void SECUR32_CalcNTLMv2Subkey(const BYTE *session_key, const char *magic, PBYTE subkey)
{
MD5_CTX ctx;
More information about the wine-patches
mailing list