DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] crypto/openssl: check for SM2 support in openssl 3.x lib
@ 2023-07-11 18:49 Gowrishankar Muthukrishnan
  2023-07-12  5:33 ` Anoob Joseph
  0 siblings, 1 reply; 3+ messages in thread
From: Gowrishankar Muthukrishnan @ 2023-07-11 18:49 UTC (permalink / raw)
  To: dev
  Cc: anoobj, Akhil Goyal, Kai Ji, tingtingx.liao, Gowrishankar Muthukrishnan

In some version of openSSL 3 lib (for an instance, in linux
distribution), if SM2 is not supported, driver should return
error.

Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2")
Bugzilla ID: 1250

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 9497da41ef..85a4fa3e55 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -1285,6 +1285,7 @@ static int openssl_set_asym_session_parameters(
 	case RTE_CRYPTO_ASYM_XFORM_SM2:
 	{
 #if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+#ifndef OPENSSL_NO_SM2
 		OSSL_PARAM_BLD *param_bld = NULL;
 		OSSL_PARAM *params = NULL;
 		int ret = -1;
@@ -1324,6 +1325,10 @@ static int openssl_set_asym_session_parameters(
 			OSSL_PARAM_free(asym_session->u.sm2.params);
 
 		return -1;
+#else
+		OPENSSL_LOG(WARNING, "SM2 unsupported in current OpenSSL Version");
+		return -ENOTSUP;
+#endif
 #else
 		OPENSSL_LOG(WARNING, "SM2 unsupported for OpenSSL Version < 3.0");
 		return -ENOTSUP;
-- 
2.25.1


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

* RE: [PATCH] crypto/openssl: check for SM2 support in openssl 3.x lib
  2023-07-11 18:49 [PATCH] crypto/openssl: check for SM2 support in openssl 3.x lib Gowrishankar Muthukrishnan
@ 2023-07-12  5:33 ` Anoob Joseph
  2023-07-12 16:50   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Anoob Joseph @ 2023-07-12  5:33 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan, dev
  Cc: Akhil Goyal, Kai Ji, tingtingx.liao, Gowrishankar Muthukrishnan

> 
> In some version of openSSL 3 lib (for an instance, in linux distribution), if SM2
> is not supported, driver should return error.
> 
> Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2") Bugzilla ID:
> 1250
> 
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>

Acked-by: Anoob Joseph <anoobj@marvell.com>

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

* RE: [PATCH] crypto/openssl: check for SM2 support in openssl 3.x lib
  2023-07-12  5:33 ` Anoob Joseph
@ 2023-07-12 16:50   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2023-07-12 16:50 UTC (permalink / raw)
  To: Anoob Joseph, Gowrishankar Muthukrishnan, dev
  Cc: Kai Ji, tingtingx.liao, Gowrishankar Muthukrishnan

> Subject: RE: [PATCH] crypto/openssl: check for SM2 support in openssl 3.x lib
> 
> >
> > In some version of openSSL 3 lib (for an instance, in linux distribution), if SM2
> > is not supported, driver should return error.
> >
> > Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2") Bugzilla ID:
> > 1250
> >
> > Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>

openSSL -> OpenSSL
Bugzilla ID should be before Fixes tag.

Applied to dpdk-next-crypto
Will be part of RC4.

Thanks.

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

end of thread, other threads:[~2023-07-12 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 18:49 [PATCH] crypto/openssl: check for SM2 support in openssl 3.x lib Gowrishankar Muthukrishnan
2023-07-12  5:33 ` Anoob Joseph
2023-07-12 16:50   ` 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).