DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ciara Power <ciara.power@intel.com>
To: dev@dpdk.org
Cc: Ciara Power <ciara.power@intel.com>,
	gmuthukrishn@marvell.com, Kai Ji <kai.ji@intel.com>
Subject: [PATCH] crypto/openssl: fix SM2 for older openssl version
Date: Thu, 15 Jun 2023 08:03:18 +0000	[thread overview]
Message-ID: <20230615080318.3360041-1-ciara.power@intel.com> (raw)

Currently when configuring the session for SM2 asym on OpenSSL PMD using
an older OpenSSL version than 3.0, an error returns,
showing a failure status for tests.

This should skip tests, as the SM2 support is for OpenSSL version 3.0+.

Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2")
Cc: gmuthukrishn@marvell.com

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index fe38e4ebd8..9497da41ef 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -1324,6 +1324,9 @@ static int openssl_set_asym_session_parameters(
 			OSSL_PARAM_free(asym_session->u.sm2.params);
 
 		return -1;
+#else
+		OPENSSL_LOG(WARNING, "SM2 unsupported for OpenSSL Version < 3.0");
+		return -ENOTSUP;
 #endif
 	}
 	default:
-- 
2.25.1


             reply	other threads:[~2023-06-15  8:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15  8:03 Ciara Power [this message]
2023-06-15 14:45 ` Ji, Kai
2023-06-16  3:54 ` [EXT] " Gowrishankar Muthukrishnan
2023-06-16  7:32 ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230615080318.3360041-1-ciara.power@intel.com \
    --to=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=gmuthukrishn@marvell.com \
    --cc=kai.ji@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).