[v1,4/4] validation: crypto: don't output untested cipher for NULL cipher

Message ID 1515027610-31156-5-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Update crypto tests
Related show

Commit Message

Github ODP bot Jan. 4, 2018, 1 a.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


AES-GMAC adds synthetic NULL cipher capability with IV length = 12.
Skip CIPHER_ALG_NULL entries when printing untested messages (as
untested entry does not really mean a thing for NULL cipher algo).

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 379 (lumag:crypto-untested)
 ** https://github.com/Linaro/odp/pull/379
 ** Patch: https://github.com/Linaro/odp/pull/379.patch
 ** Base sha: 49ebafae0edebbc750742d8874ad0a7588286dea
 ** Merge commit sha: 36b032fa07bb9b29a0c8f774c2ce76da96b4d653
 **/
 test/validation/api/crypto/odp_crypto_test_inp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/test/validation/api/crypto/odp_crypto_test_inp.c b/test/validation/api/crypto/odp_crypto_test_inp.c
index 8d1489ae6..ad9784a69 100644
--- a/test/validation/api/crypto/odp_crypto_test_inp.c
+++ b/test/validation/api/crypto/odp_crypto_test_inp.c
@@ -559,12 +559,16 @@  static void check_alg(odp_crypto_op_t op,
 
 	for (i = 0; i < cipher_num; i++) {
 		cipher_ok |= cipher_tested[i];
-		if (!cipher_tested[i])
+		if (!cipher_tested[i]) {
+			/* GMAC-related hacks */
+			if (cipher_alg == ODP_CIPHER_ALG_NULL)
+				continue;
 			printf("\n    Untested: alg=%s, key_len=%" PRIu32 ", "
 			       "iv_len=%" PRIu32 "\n",
 			       cipher_alg_name(cipher_alg),
 			       cipher_capa[i].key_len,
 			       cipher_capa[i].iv_len);
+		}
 	}
 
 	for (i = 0; i < auth_num; i++) {