DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev v1] crypto/openssl: fix of dstlen passed in HMAC
@ 2022-07-11 17:08 Kai Ji
  2022-07-19  9:49 ` Zhang, Roy Fan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kai Ji @ 2022-07-11 17:08 UTC (permalink / raw)
  To: dev; +Cc: gakhil, Kai Ji

This fix of dstlen passed in OpenSSL 3.0 lib EVP MAC final routine.

Fixes: 75adf1eae44f ("crypto/openssl: update HMAC routine with 3.0 EVP API")

Signed-off-by: Kai Ji <kai.ji@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index e01dacc98d..5658b9db66 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1395,7 +1395,7 @@ process_openssl_auth_hmac(struct rte_mbuf *mbuf_src, uint8_t *dst, int offset,
 	}
 
 process_auth_final:
-	if (EVP_MAC_final(ctx, dst, &dstlen, sizeof(dst)) != 1)
+	if (EVP_MAC_final(ctx, dst, &dstlen, DIGEST_LENGTH_MAX) != 1)
 		goto process_auth_err;
 
 	EVP_MAC_CTX_free(ctx);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-22 16:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 17:08 [dpdk-dev v1] crypto/openssl: fix of dstlen passed in HMAC Kai Ji
2022-07-19  9:49 ` Zhang, Roy Fan
2022-08-26  8:55 ` [EXT] " Akhil Goyal
2022-08-31 15:09 ` [dpdk-dev v2] crypto/openssl: fix HMAC output length Kai Ji
2022-09-22 16:07   ` [EXT] " Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).