Invoke the crypto_aead_copy_ad function during the encryption code path to copy the AAD from the source to the destination buffer. Signed-off-by: Stephan Mueller <smueller@xxxxxxxxxx> --- drivers/crypto/atmel-aes.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index 0e3d0d6..48ecf72 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -1752,6 +1752,12 @@ static int atmel_aes_gcm_setauthsize(struct crypto_aead *tfm, static int atmel_aes_gcm_encrypt(struct aead_request *req) { + int err; + + err = crypto_aead_copy_ad(req); + if (err) + return err; + return atmel_aes_gcm_crypt(req, AES_FLAGS_ENCRYPT); } -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html