From a64a9f3da4cb3208fe0497e36521aa48b40bcff3 Mon Sep 17 00:00:00 2001
From: Damjan Marion <damarion@cisco.com>
Date: Fri, 17 Jan 2025 11:45:41 +0000
Subject: crypto-openssl: fixed tag and aad lengths for chacha-poly

Type: improvement
Change-Id: I6162b45875566cc705917a51b3f06e1490607c8b
Signed-off-by: Damjan Marion <damarion@cisco.com>
---
 src/crypto_engines/openssl/main.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/crypto_engines/openssl/main.c b/src/crypto_engines/openssl/main.c
index 1710e4d2387..f6c2229d3cd 100644
--- a/src/crypto_engines/openssl/main.c
+++ b/src/crypto_engines/openssl/main.c
@@ -50,7 +50,13 @@ static u32 num_threads;
   _ (null_gmac, AES_256_NULL_GMAC, EVP_aes_256_gcm, 0, 0)
 
 #define foreach_openssl_chacha20_evp_op                                       \
-  _ (chacha20_poly1305, CHACHA20_POLY1305, EVP_chacha20_poly1305, 0, 0)
+  _ (chacha20_poly1305, CHACHA20_POLY1305, EVP_chacha20_poly1305, 0, 0)       \
+  _ (chacha20_poly1305, CHACHA20_POLY1305_TAG16_AAD0, EVP_chacha20_poly1305,  \
+     1, 0)                                                                    \
+  _ (chacha20_poly1305, CHACHA20_POLY1305_TAG16_AAD8, EVP_chacha20_poly1305,  \
+     1, 8)                                                                    \
+  _ (chacha20_poly1305, CHACHA20_POLY1305_TAG16_AAD12, EVP_chacha20_poly1305, \
+     1, 12)
 
 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
 #define foreach_openssl_evp_op foreach_openssl_aes_evp_op \
-- 
cgit