summaryrefslogtreecommitdiff
path: root/source4/libcli/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-06-16 13:59:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:43 -0500
commitdd711fee210e4161f8d85f8af39ffc4329d55914 (patch)
treee1e6ecb51547f7d523a0592900d489aee28d99d1 /source4/libcli/auth
parente6ac4b0552a6de834bef446d45d23f15fa25750a (diff)
downloadsamba-dd711fee210e4161f8d85f8af39ffc4329d55914.tar.gz
samba-dd711fee210e4161f8d85f8af39ffc4329d55914.tar.bz2
samba-dd711fee210e4161f8d85f8af39ffc4329d55914.zip
r1170: Remove bogus part of previous commit - session keys, even in NTLMSSP
are variable length. Remove extra casts Andrew Bartlett (This used to be commit 84f86b83f88cea5564347f3aa623be2d9feeb4b3)
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r--source4/libcli/auth/ntlmssp_sign.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libcli/auth/ntlmssp_sign.c b/source4/libcli/auth/ntlmssp_sign.c
index c9e36b45ad..dacfdb194f 100644
--- a/source4/libcli/auth/ntlmssp_sign.c
+++ b/source4/libcli/auth/ntlmssp_sign.c
@@ -53,7 +53,7 @@ static void NTLMSSPcalc_ap(uint8_t *hash, uint8_t *data, int len)
hash[257] = index_j;
}
-static void calc_hash(uint8_t hash[258], const char *key, size_t key_len)
+static void calc_hash(uint8_t hash[258], const uint8 *key, size_t key_len)
{
uint8_t j = 0;
int ind;
@@ -451,7 +451,9 @@ NTSTATUS ntlmssp_sign_init(struct ntlmssp_state *ntlmssp_state)
} else {
DEBUG(5, ("NTLMSSP Sign/Seal - using NTLM1\n"));
- calc_hash(ntlmssp_state->ntlmssp_hash, (const char *)(ntlmssp_state->session_key.data), 16);
+ calc_hash(ntlmssp_state->ntlmssp_hash,
+ ntlmssp_state->session_key.data,
+ ntlmssp_state->session_key.length);
dump_data_pw("NTLMSSP hash:\n", ntlmssp_state->ntlmssp_hash,
sizeof(ntlmssp_state->ntlmssp_hash));
}