summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/crypto/crc32.c2
-rw-r--r--source4/lib/crypto/crc32.h3
-rw-r--r--source4/libcli/auth/ntlmssp_sign.c8
3 files changed, 6 insertions, 7 deletions
diff --git a/source4/lib/crypto/crc32.c b/source4/lib/crypto/crc32.c
index f2d76332f9..00cee243b4 100644
--- a/source4/lib/crypto/crc32.c
+++ b/source4/lib/crypto/crc32.c
@@ -55,7 +55,7 @@ static const unsigned long CRCTable[256] =
0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D
};
-uint32_t crc32_calc_buffer( const char *buffer, uint32_t count)
+uint32_t crc32_calc_buffer(const uint8_t *buffer, uint32_t count)
{
uint32_t crc=0xffffffff, i;
for(i=0;i<count;i++)
diff --git a/source4/lib/crypto/crc32.h b/source4/lib/crypto/crc32.h
index a1030c14df..5b3642ffc8 100644
--- a/source4/lib/crypto/crc32.h
+++ b/source4/lib/crypto/crc32.h
@@ -1,2 +1 @@
-uint32_t crc32_calc_buffer( const char *buffer, uint32_t count);
-
+uint32_t crc32_calc_buffer(const uint8_t *buffer, uint32_t count);
diff --git a/source4/libcli/auth/ntlmssp_sign.c b/source4/libcli/auth/ntlmssp_sign.c
index 7d193c850c..e2f5237a88 100644
--- a/source4/libcli/auth/ntlmssp_sign.c
+++ b/source4/libcli/auth/ntlmssp_sign.c
@@ -116,7 +116,7 @@ static NTSTATUS ntlmssp_make_packet_signature(struct ntlmssp_state *ntlmssp_stat
} else {
uint32_t crc;
- crc = crc32_calc_buffer((const char *)data, length);
+ crc = crc32_calc_buffer(data, length);
if (!msrpc_gen(sig_mem_ctx, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlm_seq_num)) {
return NT_STATUS_NO_MEMORY;
}
@@ -202,10 +202,10 @@ NTSTATUS ntlmssp_check_packet(struct ntlmssp_state *ntlmssp_state,
memcmp(local_sig.data + 8,
sig->data + 8, sig->length - 8) != 0) {
DEBUG(5, ("BAD SIG NTLM1: wanted signature of\n"));
- dump_data(5, (const char *)local_sig.data, local_sig.length);
+ dump_data(5, local_sig.data, local_sig.length);
DEBUG(5, ("BAD SIG: got signature of\n"));
- dump_data(5, (const char *)(sig->data), sig->length);
+ dump_data(5, sig->data, sig->length);
DEBUG(0, ("NTLMSSP NTLM1 packet check failed due to invalid signature!\n"));
return NT_STATUS_ACCESS_DENIED;
@@ -255,7 +255,7 @@ NTSTATUS ntlmssp_seal_packet(struct ntlmssp_state *ntlmssp_state,
}
} else {
uint32_t crc;
- crc = crc32_calc_buffer((const char *)data, length);
+ crc = crc32_calc_buffer(data, length);
if (!msrpc_gen(sig_mem_ctx, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlm_seq_num)) {
return NT_STATUS_NO_MEMORY;
}