[v1,1/6] crypto/openssl: include SM2 in asymmetric capabilities
Checks
Commit Message
Include SM2 algorithm in the asymmetric capabilities supported
by OpenSSL PMD.
Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Comments
> -----Original Message-----
> From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> Sent: Thursday, August 10, 2023 11:35 AM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; Akhil Goyal <gakhil@marvell.com>; Fan Zhang
> <fanzhang.oss@gmail.com>; Ji, Kai <kai.ji@intel.com>; Gowrishankar
> Muthukrishnan <gmuthukrishn@marvell.com>
> Subject: [v1 1/6] crypto/openssl: include SM2 in asymmetric capabilities
>
> Include SM2 algorithm in the asymmetric capabilities supported by OpenSSL
> PMD.
>
> Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2")
>
> Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.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
> + (1 << RTE_CRYPTO_ASYM_OP_DECRYPT)),
> + }
> + }
> + }
> + },
>
> RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
> };
> --
> 2.25.1
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
@@ -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()
};