DPDK patches and discussions
 help / color / mirror / Atom feed
From: Aakash Sasidharan <asasidharan@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>
Cc: <jerinj@marvell.com>, <anoobj@marvell.com>,
	<vvelumuri@marvell.com>, <asasidharan@marvell.com>,
	<dev@dpdk.org>
Subject: [PATCH v2 1/7] test/crypto: unit tests for padding for TLS-1.3
Date: Thu, 20 Jun 2024 20:20:50 +0530	[thread overview]
Message-ID: <20240620145056.3456650-2-asasidharan@marvell.com> (raw)
In-Reply-To: <20240620145056.3456650-1-asasidharan@marvell.com>

From: Vidya Sagar Velumuri <vvelumuri@marvell.com>

Add unit tests to verify the padding for TLS-1.3.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
---
 app/test/test_cryptodev.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 94438c587a..61ee43327a 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -12740,6 +12740,25 @@ test_tls_1_3_record_proto_zero_len_non_app(void)
 
 	return test_tls_record_proto_all(&flags);
 }
+
+static int
+test_tls_1_3_record_proto_dm_opt_padding(void)
+{
+	return test_tls_record_proto_opt_padding(6, 0, RTE_SECURITY_VERSION_TLS_1_3);
+}
+
+static int
+test_tls_1_3_record_proto_sg_opt_padding(void)
+{
+	return test_tls_record_proto_opt_padding(25, 5, RTE_SECURITY_VERSION_TLS_1_3);
+}
+
+static int
+test_tls_1_3_record_proto_sg_opt_padding_1(void)
+{
+	return test_tls_record_proto_opt_padding(25, 4, RTE_SECURITY_VERSION_TLS_1_3);
+}
+
 #endif
 
 static int
@@ -18168,6 +18187,18 @@ static struct unit_test_suite tls13_record_proto_testsuite  = {
 			"TLS-1.3 record with zero len and content type as ctrl",
 			ut_setup_security, ut_teardown,
 			test_tls_1_3_record_proto_zero_len_non_app),
+		TEST_CASE_NAMED_ST(
+			"TLS-1.3 record DM mode with optional padding",
+			ut_setup_security, ut_teardown,
+			test_tls_1_3_record_proto_dm_opt_padding),
+		TEST_CASE_NAMED_ST(
+			"TLS-1.3 record SG mode with optional padding - 1",
+			ut_setup_security, ut_teardown,
+			test_tls_1_3_record_proto_sg_opt_padding),
+		TEST_CASE_NAMED_ST(
+			"TLS-1.3 record SG mode with optional padding",
+			ut_setup_security, ut_teardown,
+			test_tls_1_3_record_proto_sg_opt_padding_1),
 		TEST_CASES_END() /**< NULL terminate unit test array */
 	}
 };
-- 
2.25.1


  reply	other threads:[~2024-06-20 14:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17  5:58 [PATCH 0/7] Improvements and new test cases Aakash Sasidharan
2024-06-17  5:58 ` [PATCH 1/7] test/crypto: unit tests for padding for TLS-1.3 Aakash Sasidharan
2024-06-17  5:58 ` [PATCH 2/7] test/crypto: add combined mode cases for TLS 1.3 Aakash Sasidharan
2024-06-17  5:58 ` [PATCH 3/7] test/security: add TLS 1.3 data walkthrough tests Aakash Sasidharan
2024-06-17  5:58 ` [PATCH 4/7] test/crypto: verify padding corruption in TLS-1.2 Aakash Sasidharan
2024-06-20  6:52   ` Akhil Goyal
2024-06-17  5:58 ` [PATCH 5/7] test/crypto: verify padding corruption in DTLS-1.2 Aakash Sasidharan
2024-06-17  5:58 ` [PATCH 6/7] test/security: add out of place sgl tests for TLS Aakash Sasidharan
2024-06-17  5:58 ` [PATCH 7/7] test/security: use single session in data walkthrough test Aakash Sasidharan
2024-06-17  7:21 ` [PATCH 0/7] Improvements and new test cases Anoob Joseph
2024-06-20 14:50 ` [PATCH v2 " Aakash Sasidharan
2024-06-20 14:50   ` Aakash Sasidharan [this message]
2024-06-20 14:50   ` [PATCH v2 2/7] test/crypto: add combined mode cases for TLS 1.3 Aakash Sasidharan
2024-06-20 14:50   ` [PATCH v2 3/7] test/security: add TLS 1.3 data walkthrough tests Aakash Sasidharan
2024-06-20 14:50   ` [PATCH v2 4/7] test/crypto: verify padding corruption in TLS-1.2 Aakash Sasidharan
2024-06-20 14:50   ` [PATCH v2 5/7] test/crypto: verify padding corruption in DTLS-1.2 Aakash Sasidharan
2024-06-20 14:50   ` [PATCH v2 6/7] test/security: add out of place sgl tests for TLS Aakash Sasidharan
2024-06-20 14:50   ` [PATCH v2 7/7] test/security: use single session in data walkthrough test Aakash Sasidharan
2024-06-26  7:30   ` [PATCH v2 0/7] Improvements and new test cases Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240620145056.3456650-2-asasidharan@marvell.com \
    --to=asasidharan@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=vvelumuri@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).