libcli:smb: Add gnutls_aead_cipher_hd_t to smb2_signing_key structure
authorAndreas Schneider <asn@samba.org>
Thu, 14 Mar 2019 08:26:04 +0000 (09:26 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 21 Aug 2019 09:57:31 +0000 (09:57 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Adapted to remove Samba AES support

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
libcli/smb/smb2_signing.c
libcli/smb/smb2_signing.h

index 2f9bae4ba8edfa075a7aac6b23ca03aa53d31fbc..01027d55fbeddf5a7fb1be034bb257bdb4646fe0 100644 (file)
@@ -35,6 +35,11 @@ int smb2_signing_key_destructor(struct smb2_signing_key *key)
                key->hmac_hnd = NULL;
        }
 
+       if (key->cipher_hnd != NULL) {
+               gnutls_aead_cipher_deinit(key->cipher_hnd);
+               key->cipher_hnd = NULL;
+       }
+
        return 0;
 }
 
index 96a002f4a0ce410bfcfbcad8a32e560708c2eb60..13fb54e4e4eacd001ef17c93ac2ea431dc6c984f 100644 (file)
@@ -25,9 +25,12 @@ struct iovec;
  /* Forward declaration of GnuTLS typedefs */
 struct hmac_hd_st;
 typedef struct hmac_hd_st* gnutls_hmac_hd_t;
+struct  api_aead_cipher_hd_st;
+typedef struct api_aead_cipher_hd_st *gnutls_aead_cipher_hd_t;
 
 struct smb2_signing_key {
        gnutls_hmac_hd_t hmac_hnd;
+       gnutls_aead_cipher_hd_t cipher_hnd;
        DATA_BLOB blob;
 };