Include SM2 algorithm in the asymmetric capabilities supported
by OpenSSL PMD.

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

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukri...@marvell.com>
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusz...@intel.com>
---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c 
b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 85a4fa3e55..2eb450fcfd 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -593,6 +593,20 @@ static const struct rte_cryptodev_capabilities 
openssl_pmd_capabilities[] = {
                },
                }
        },
+       {       /* SM2 */
+               .op = RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
+               {.asym = {
+                       .xform_capa = {
+                               .xform_type = RTE_CRYPTO_ASYM_XFORM_SM2,
+                               .op_types =
+                               ((1<<RTE_CRYPTO_ASYM_OP_SIGN) |
+                                (1 << RTE_CRYPTO_ASYM_OP_VERIFY) |
+                                (1 << RTE_CRYPTO_ASYM_OP_ENCRYPT) |
+                                (1 << RTE_CRYPTO_ASYM_OP_DECRYPT)),
+                       }
+               }
+               }
+       },
 
        RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
-- 
2.25.1

Reply via email to