1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

r7970: This SMB signing code (merged from 3.0) turned out to be bogus.

Andrew Bartlett
(This used to be commit 817160ec1a85724c8bf482f128ea687396de0888)
This commit is contained in:
Andrew Bartlett 2005-06-28 00:57:15 +00:00 committed by Gerald (Jerry) Carter
parent 3ff7916571
commit 025e03de54

View File

@ -118,15 +118,7 @@ void sign_outgoing_message(struct request_buffer *out, DATA_BLOB *mac_key, uint_
/* Calculate the 16 byte MAC and place first 8 bytes into the field. */
MD5Init(&md5_ctx);
/* NB. When making and verifying SMB signatures, Windows apparently
zero-pads the key to 128 bits if it isn't long enough.
From Nalin Dahyabhai <nalin@redhat.com> */
MD5Update(&md5_ctx, mac_key->data, mac_key->length);
if (mac_key->length < sizeof(key_buf)) {
memset(key_buf, 0, sizeof(key_buf));
MD5Update(&md5_ctx, key_buf, sizeof(key_buf) - mac_key->length);
}
MD5Update(&md5_ctx,
out->buffer + NBT_HDR_SIZE,
out->size - NBT_HDR_SIZE);