[dpdk-stable] patch 'crypto/openssl: fix AEAD parameters' has been queued to stable release 17.08.1
Yuanhan Liu
yliu at fridaylinux.org
Tue Nov 21 14:17:38 CET 2017
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a1dd2f047252c9187027998e5e4265ef666d24e2 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch at intel.com>
Date: Thu, 21 Sep 2017 14:11:17 +0100
Subject: [PATCH] crypto/openssl: fix AEAD parameters
[ upstream commit 0d21bc3872ae1769cd4908d125e6666a0e04baae ]
When using AES-GCM with OpenSSL, cipher direction
and authentication operation were being set incorrectly,
as the PMD was looking at the cipher and authentication
transform, instead of the new AEAD.
Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
Acked-by: Fan Zhang <roy.fan.zhang at intel.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 0bd5f98..2bc1570 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -425,8 +425,15 @@ static int
openssl_set_session_aead_parameters(struct openssl_session *sess,
const struct rte_crypto_sym_xform *xform)
{
- /* Select cipher direction */
- sess->cipher.direction = xform->cipher.op;
+ /* Select cipher direction and auth operation */
+ if (xform->aead.op == RTE_CRYPTO_AEAD_OP_ENCRYPT) {
+ sess->cipher.direction = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+ sess->auth.operation = RTE_CRYPTO_AUTH_OP_GENERATE;
+ } else {
+ sess->cipher.direction = RTE_CRYPTO_CIPHER_OP_DECRYPT;
+ sess->auth.operation = RTE_CRYPTO_AUTH_OP_VERIFY;
+ }
+
/* Select cipher key */
sess->cipher.key.length = xform->aead.key.length;
@@ -434,10 +441,6 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
sess->iv.offset = xform->aead.iv.offset;
sess->iv.length = xform->aead.iv.length;
- /* Select auth generate/verify */
- sess->auth.operation = xform->auth.op;
- sess->auth.algo = xform->auth.algo;
-
/* Select auth algo */
switch (xform->aead.algo) {
case RTE_CRYPTO_AEAD_AES_GCM:
--
2.7.4
More information about the stable
mailing list