mirror of
https://github.com/samba-team/samba.git
synced 2025-01-18 06:04:06 +03:00
libcli/smb: Call correct function to get HMAC output length
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
2482a714cf
commit
5d53ac8af0
@ -467,7 +467,7 @@ static NTSTATUS smb2_signing_calc_signature(struct smb2_signing_key *signing_key
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hmac_algo != GNUTLS_MAC_UNKNOWN) {
|
if (hmac_algo != GNUTLS_MAC_UNKNOWN) {
|
||||||
uint8_t digest[gnutls_hash_get_len(hmac_algo)];
|
uint8_t digest[gnutls_hmac_get_len(hmac_algo)];
|
||||||
gnutls_datum_t key = {
|
gnutls_datum_t key = {
|
||||||
.data = signing_key->blob.data,
|
.data = signing_key->blob.data,
|
||||||
.size = MIN(signing_key->blob.length, 16),
|
.size = MIN(signing_key->blob.length, 16),
|
||||||
@ -654,7 +654,7 @@ NTSTATUS smb2_key_derivation(const uint8_t *KI, size_t KI_len,
|
|||||||
gnutls_hmac_hd_t hmac_hnd = NULL;
|
gnutls_hmac_hd_t hmac_hnd = NULL;
|
||||||
uint8_t buf[4];
|
uint8_t buf[4];
|
||||||
static const uint8_t zero = 0;
|
static const uint8_t zero = 0;
|
||||||
const size_t digest_len = gnutls_hash_get_len(GNUTLS_DIG_SHA256);
|
const size_t digest_len = gnutls_hmac_get_len(GNUTLS_MAC_SHA256);
|
||||||
uint8_t digest[digest_len];
|
uint8_t digest[digest_len];
|
||||||
uint32_t i = 1;
|
uint32_t i = 1;
|
||||||
uint32_t L = KO_len * 8;
|
uint32_t L = KO_len * 8;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user