From ad4ee458c404dda36480a9c501e1ffb221b35b61 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 26 Feb 2019 18:11:27 +0100 Subject: [PATCH 117/187] s3:smbd: Use GnuTLS for AES constants Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Adapted to remove Samba AES Signed-off-by: Andrew Bartlett (cherry picked from commit 33bca1fb8087f7392a8ff0d295a5bdc01f1012e7) --- source3/smbd/smb2_sesssetup.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index d6900665a95..82ac1182ecc 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -28,9 +28,6 @@ #include "../lib/tsocket/tsocket.h" #include "../libcli/security/security.h" #include "../lib/util/tevent_ntstatus.h" -#include "lib/crypto/aes.h" -#include "lib/crypto/aes_ccm_128.h" -#include "lib/crypto/aes_gcm_128.h" #include "lib/crypto/gnutls_helpers.h" #include @@ -443,10 +440,10 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session, sizeof(x->nonce_high_random)); switch (xconn->smb2.server.cipher) { case SMB2_ENCRYPTION_AES128_CCM: - nonce_size = AES_CCM_128_NONCE_SIZE; + nonce_size = SMB2_AES_128_CCM_NONCE_SIZE; break; case SMB2_ENCRYPTION_AES128_GCM: - nonce_size = AES_GCM_128_IV_SIZE; + nonce_size = gnutls_cipher_get_iv_size(GNUTLS_CIPHER_AES_128_GCM); break; default: nonce_size = 0; -- 2.23.0