diff mbox series

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

Message ID 1514221211-7675-5-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v1,1/4] validation: crypto: print untested capabilities | expand

Commit Message

Github ODP bot Dec. 25, 2017, 5 p.m. UTC
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 367 (lumag:crypto-untested)
 ** https://github.com/Linaro/odp/pull/367
 ** Patch: https://github.com/Linaro/odp/pull/367.patch
 ** Base sha: a5f07dbf95f982b7c5898434e56164ff976c0a0f
 ** Merge commit sha: 0f2debefe973066bf83f4d93a551f16f758b0c14
 **/
 test/validation/api/crypto/odp_crypto_test_inp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/test/validation/api/crypto/odp_crypto_test_inp.c b/test/validation/api/crypto/odp_crypto_test_inp.c
index ddf638001..3f1e4f95c 100644
--- a/test/validation/api/crypto/odp_crypto_test_inp.c
+++ b/test/validation/api/crypto/odp_crypto_test_inp.c
@@ -556,12 +556,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++) {