summaryrefslogtreecommitdiff
path: root/lib/http_ntlm.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-09-02 17:41:20 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-09-02 17:41:20 +0000
commit934708d950617688c7d294ea1ab583667f383ab1 (patch)
tree5a8c9af0c4ae865717caacf14c20c69ad98ab5d0 /lib/http_ntlm.c
parentbbc002a50575f7690fe67e23850e63bc8eb792f1 (diff)
downloadcurl-934708d950617688c7d294ea1ab583667f383ab1.tar.gz
Made some variables const which eliminated some casts
Diffstat (limited to 'lib/http_ntlm.c')
-rw-r--r--lib/http_ntlm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index 8db10301d..5c1f575bc 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -370,7 +370,7 @@ static void lm_resp(unsigned char *keys,
* Set up lanmanager hashed password
*/
static void mk_lm_hash(struct SessionHandle *data,
- char *password,
+ const char *password,
unsigned char *lmbuffer /* 21 bytes */)
{
unsigned char pw[14];
@@ -418,7 +418,7 @@ static void mk_lm_hash(struct SessionHandle *data,
}
#if USE_NTRESPONSES
-static void utf8_to_unicode_le(unsigned char *dest, const char *src,
+static void ascii_to_unicode_le(unsigned char *dest, const char *src,
size_t srclen)
{
size_t i;
@@ -432,7 +432,7 @@ static void utf8_to_unicode_le(unsigned char *dest, const char *src,
* Set up nt hashed passwords
*/
static CURLcode mk_nt_hash(struct SessionHandle *data,
- char *password,
+ const char *password,
unsigned char *ntbuffer /* 21 bytes */)
{
size_t len = strlen(password);
@@ -440,7 +440,7 @@ static CURLcode mk_nt_hash(struct SessionHandle *data,
if(!pw)
return CURLE_OUT_OF_MEMORY;
- utf8_to_unicode_le(pw, password, len);
+ ascii_to_unicode_le(pw, password, len);
#ifdef CURL_DOES_CONVERSIONS
/*
@@ -524,8 +524,8 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
char **allocuserpwd;
/* point to the name and password for this */
- char *userp;
- char *passwdp;
+ const char *userp;
+ const char *passwdp;
/* point to the correct struct with this */
struct ntlmdata *ntlm;
struct auth *authp;
@@ -551,10 +551,10 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
/* not set means empty */
if(!userp)
- userp=(char *)"";
+ userp="";
if(!passwdp)
- passwdp=(char *)"";
+ passwdp="";
#ifdef USE_WINDOWS_SSPI
if (s_hSecDll == NULL) {