test/crypto: add 3DES IPsec cases

Add IPsec test cases for cipher algorithm 3DES.

Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
This commit is contained in:
Aakash Sasidharan 2022-11-07 18:36:39 +05:30 committed by Akhil Goyal
parent 8782b3b64b
commit 900ac630ca

View File

@ -15245,11 +15245,27 @@ static struct unit_test_suite ipsec_proto_testsuite = {
ut_setup_security, ut_teardown, ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec, test_ipsec_proto_known_vec,
&pkt_des_cbc_hmac_sha512), &pkt_des_cbc_hmac_sha512),
TEST_CASE_NAMED_WITH_DATA(
"Outbound known vector (ESP tunnel mode IPv4 3DES-CBC HMAC-SHA256 [16B ICV])",
ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec, &pkt_3des_cbc_hmac_sha256),
TEST_CASE_NAMED_WITH_DATA(
"Outbound known vector (ESP tunnel mode IPv4 3DES-CBC HMAC-SHA384 [24B ICV])",
ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec, &pkt_3des_cbc_hmac_sha384),
TEST_CASE_NAMED_WITH_DATA(
"Outbound known vector (ESP tunnel mode IPv4 3DES-CBC HMAC-SHA512 [32B ICV])",
ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec, &pkt_3des_cbc_hmac_sha512),
TEST_CASE_NAMED_WITH_DATA( TEST_CASE_NAMED_WITH_DATA(
"Outbound known vector (ESP tunnel mode IPv6 DES-CBC HMAC-SHA256 [16B ICV])", "Outbound known vector (ESP tunnel mode IPv6 DES-CBC HMAC-SHA256 [16B ICV])",
ut_setup_security, ut_teardown, ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec, test_ipsec_proto_known_vec,
&pkt_des_cbc_hmac_sha256_v6), &pkt_des_cbc_hmac_sha256_v6),
TEST_CASE_NAMED_WITH_DATA(
"Outbound known vector (ESP tunnel mode IPv6 3DES-CBC HMAC-SHA256 [16B ICV])",
ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec, &pkt_3des_cbc_hmac_sha256_v6),
TEST_CASE_NAMED_WITH_DATA( TEST_CASE_NAMED_WITH_DATA(
"Outbound known vector (AH tunnel mode IPv4 HMAC-SHA256)", "Outbound known vector (AH tunnel mode IPv4 HMAC-SHA256)",
ut_setup_security, ut_teardown, ut_setup_security, ut_teardown,
@ -15339,11 +15355,27 @@ static struct unit_test_suite ipsec_proto_testsuite = {
ut_setup_security, ut_teardown, ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec_inb, test_ipsec_proto_known_vec_inb,
&pkt_des_cbc_hmac_sha512), &pkt_des_cbc_hmac_sha512),
TEST_CASE_NAMED_WITH_DATA(
"Inbound known vector (ESP tunnel mode IPv4 3DES-CBC HMAC-SHA256 [16B ICV])",
ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec_inb, &pkt_3des_cbc_hmac_sha256),
TEST_CASE_NAMED_WITH_DATA(
"Inbound known vector (ESP tunnel mode IPv4 3DES-CBC HMAC-SHA384 [24B ICV])",
ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec_inb, &pkt_3des_cbc_hmac_sha384),
TEST_CASE_NAMED_WITH_DATA(
"Inbound known vector (ESP tunnel mode IPv4 3DES-CBC HMAC-SHA512 [32B ICV])",
ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec_inb, &pkt_3des_cbc_hmac_sha512),
TEST_CASE_NAMED_WITH_DATA( TEST_CASE_NAMED_WITH_DATA(
"Inbound known vector (ESP tunnel mode IPv6 DES-CBC HMAC-SHA256 [16B ICV])", "Inbound known vector (ESP tunnel mode IPv6 DES-CBC HMAC-SHA256 [16B ICV])",
ut_setup_security, ut_teardown, ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec_inb, test_ipsec_proto_known_vec_inb,
&pkt_des_cbc_hmac_sha256_v6), &pkt_des_cbc_hmac_sha256_v6),
TEST_CASE_NAMED_WITH_DATA(
"Inbound known vector (ESP tunnel mode IPv6 3DES-CBC HMAC-SHA256 [16B ICV])",
ut_setup_security, ut_teardown,
test_ipsec_proto_known_vec_inb, &pkt_3des_cbc_hmac_sha256_v6),
TEST_CASE_NAMED_WITH_DATA( TEST_CASE_NAMED_WITH_DATA(
"Inbound known vector (AH tunnel mode IPv4 HMAC-SHA256)", "Inbound known vector (AH tunnel mode IPv4 HMAC-SHA256)",
ut_setup_security, ut_teardown, ut_setup_security, ut_teardown,