Skip to content

Commit 0f2fbfe

Browse files
gmuthukrishnAkhil Goyal
authored andcommitted
crypto/openssl: include op capabilities for SM2
Include capabilities for SM2 operations. Signed-off-by: Gowrishankar Muthukrishnan <[email protected]> Acked-by: Akhil Goyal <[email protected]> Acked-by: Arkadiusz Kusztal <[email protected]>
1 parent 18e0741 commit 0f2fbfe

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

drivers/crypto/openssl/rte_openssl_pmd_ops.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,15 +608,20 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
608608
{.asym = {
609609
.xform_capa = {
610610
.xform_type = RTE_CRYPTO_ASYM_XFORM_SM2,
611-
.hash_algos = (1 << RTE_CRYPTO_AUTH_SM3),
612611
.op_types =
613-
((1<<RTE_CRYPTO_ASYM_OP_SIGN) |
612+
((1 << RTE_CRYPTO_ASYM_OP_SIGN) |
614613
(1 << RTE_CRYPTO_ASYM_OP_VERIFY) |
615614
(1 << RTE_CRYPTO_ASYM_OP_ENCRYPT) |
616615
(1 << RTE_CRYPTO_ASYM_OP_DECRYPT)),
617-
{.internal_rng = 1
618-
}
619-
}
616+
.op_capa = {
617+
[RTE_CRYPTO_ASYM_OP_ENCRYPT] = (1 << RTE_CRYPTO_SM2_RNG),
618+
[RTE_CRYPTO_ASYM_OP_DECRYPT] = (1 << RTE_CRYPTO_SM2_RNG),
619+
[RTE_CRYPTO_ASYM_OP_SIGN] = (1 << RTE_CRYPTO_SM2_RNG) |
620+
(1 << RTE_CRYPTO_SM2_PH),
621+
[RTE_CRYPTO_ASYM_OP_VERIFY] = (1 << RTE_CRYPTO_SM2_RNG) |
622+
(1 << RTE_CRYPTO_SM2_PH)
623+
},
624+
},
620625
}
621626
}
622627
},

0 commit comments

Comments
 (0)