From 9e26f6ded2938fef8f46df4b91bdd8554fcb6a64 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 9 Oct 2018 11:39:39 +0200 Subject: [PATCH] auth: Use the zlib version of crc32 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- auth/ntlmssp/ntlmssp_sign.c | 8 +++++--- auth/ntlmssp/wscript_build | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/auth/ntlmssp/ntlmssp_sign.c b/auth/ntlmssp/ntlmssp_sign.c index 09b7e5ab923..c8ed3dfd3ee 100644 --- a/auth/ntlmssp/ntlmssp_sign.c +++ b/auth/ntlmssp/ntlmssp_sign.c @@ -23,7 +23,7 @@ #include "../libcli/auth/libcli_auth.h" #include "../lib/crypto/md5.h" #include "../lib/crypto/hmacmd5.h" -#include "../lib/crypto/crc32.h" +#include "zlib.h" #include "../auth/ntlmssp/ntlmssp_private.h" #undef DBGC_CLASS @@ -136,7 +136,8 @@ static NTSTATUS ntlmssp_make_packet_signature(struct ntlmssp_state *ntlmssp_stat NTSTATUS status; uint32_t crc; - crc = crc32_calc_buffer(data, length); + crc = crc32(0, Z_NULL, 0); + crc = crc32(crc, data, length); status = msrpc_gen(sig_mem_ctx, sig, "dddd", @@ -318,7 +319,8 @@ NTSTATUS ntlmssp_seal_packet(struct ntlmssp_state *ntlmssp_state, NTSTATUS status; uint32_t crc; - crc = crc32_calc_buffer(data, length); + crc = crc32(0, Z_NULL, 0); + crc = crc32(crc, data, length); status = msrpc_gen(sig_mem_ctx, sig, "dddd", diff --git a/auth/ntlmssp/wscript_build b/auth/ntlmssp/wscript_build index edc8fbae8d1..0802330ec6a 100644 --- a/auth/ntlmssp/wscript_build +++ b/auth/ntlmssp/wscript_build @@ -14,6 +14,7 @@ bld.SAMBA_SUBSYSTEM('NTLMSSP_COMMON', NTLM_CHECK samba-credentials wbclient + z ''') bld.SAMBA_MODULE('gensec_ntlmssp',