auth: Use the zlib version of crc32
authorVolker Lendecke <vl@samba.org>
Tue, 9 Oct 2018 09:39:39 +0000 (11:39 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 9 Oct 2018 20:32:12 +0000 (22:32 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
auth/ntlmssp/ntlmssp_sign.c
auth/ntlmssp/wscript_build

index 09b7e5a..c8ed3df 100644 (file)
@@ -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",
index edc8fba..0802330 100644 (file)
@@ -14,6 +14,7 @@ bld.SAMBA_SUBSYSTEM('NTLMSSP_COMMON',
                         NTLM_CHECK
                         samba-credentials
                         wbclient
+                        z
                         ''')
 
 bld.SAMBA_MODULE('gensec_ntlmssp',