From 109924e9f3b627eb8d5a92bab92f4ad29077bbaa Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Fri, 14 Sep 2018 14:54:46 +0530 Subject: [PATCH] app/test-crypto-perf: add checks for AEAD key Adding validation checks for AEAD key. Signed-off-by: Akash Saxena Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- 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 5c7dadb605..c9f99a76d8 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.20.1