[dpdk-dev] [PATCH 1/3] app/test-crypto-perf: add checks for AEAD key
Anoob Joseph
anoob.joseph at caviumnetworks.com
Fri Sep 14 11:24:46 CEST 2018
Adding validation checks for AEAD key.
Signed-off-by: Akash Saxena <akash.saxena at caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph at caviumnetworks.com>
---
app/test-crypto-perf/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 5c7dadb..c9f99a7 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -421,6 +421,10 @@ cperf_check_test_vector(struct cperf_options *opts,
return -1;
if (test_vec->ciphertext.length < opts->max_buffer_size)
return -1;
+ if (test_vec->aead_key.data == NULL)
+ return -1;
+ if (test_vec->aead_key.length != opts->aead_key_sz)
+ return -1;
if (test_vec->aead_iv.data == NULL)
return -1;
if (test_vec->aead_iv.length != opts->aead_iv_sz)
--
2.7.4
More information about the dev
mailing list