From dd711fee210e4161f8d85f8af39ffc4329d55914 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 16 Jun 2004 13:59:52 +0000 Subject: 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) --- source4/libcli/auth/ntlmssp_sign.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/libcli') 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)); } -- cgit