libcli/smb: let smb2_signing_decrypt_pdu() cope with gnutls_aead_cipher_decrypt(...
authorStefan Metzmacher <metze@samba.org>
Mon, 31 Jan 2022 19:33:43 +0000 (20:33 +0100)
committerJule Anger <janger@samba.org>
Sun, 13 Feb 2022 10:18:29 +0000 (10:18 +0000)
commitfe8bf1d8aa61fddf853e60f23750cc240ed8dcc6
tree4ac708486c8e176af5437223d3349d7075bb0f8b
parentf400eef07a4e844e04affc0078c116b64cce897b
libcli/smb: let smb2_signing_decrypt_pdu() cope with gnutls_aead_cipher_decrypt() ptext_len bug

The initial implementation of gnutls_aead_cipher_decrypt() had a bug and
used:
    *ptext_len = ctext_len;
instead of:
    *ptext_len = ctext_len - tag_size;

This got fixed with gnutls 3.5.2.

As we only require gnutls 3.4.7 we need to cope with this...

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14968

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Feb  2 18:29:08 UTC 2022 on sn-devel-184

(cherry picked from commit 735f3d7dde3daf5d0af2e8a1de60422b88663992)

Autobuild-User(v4-16-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-16-test): Sun Feb 13 10:18:29 UTC 2022 on sn-devel-184
libcli/smb/smb2_signing.c
wscript_configure_system_gnutls