diff mbox

test: validation: updating crypto auth capability check

Message ID 1479982759-9431-1-git-send-email-balakrishna.garapati@linaro.org
State New
Headers show

Commit Message

Balakrishna Garapati Nov. 24, 2016, 10:19 a.m. UTC
Add missing capability check on crypto auth algos

Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>

---
 test/common_plat/validation/api/crypto/odp_crypto_test_inp.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

-- 
1.9.1
diff mbox

Patch

diff --git a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c
index 4ac4a07..292fbd4 100644
--- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c
+++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c
@@ -92,6 +92,12 @@  static void alg_test(odp_crypto_op_t op,
 		if (auth_alg == ODP_AUTH_ALG_NULL &&
 		    !(capability.hw_auths.bit.null))
 			rc = -1;
+		if (auth_alg == ODP_AUTH_ALG_MD5_96 &&
+		    !(capability.hw_auths.bit.null))
+			rc = -1;
+		if (auth_alg == ODP_AUTH_ALG_SHA256_128 &&
+		    !(capability.hw_auths.bit.null))
+			rc = -1;
 	} else {
 		if (auth_alg == ODP_AUTH_ALG_AES128_GCM &&
 		    !(capability.auths.bit.aes128_gcm))
@@ -99,6 +105,12 @@  static void alg_test(odp_crypto_op_t op,
 		if (auth_alg == ODP_AUTH_ALG_NULL &&
 		    !(capability.auths.bit.null))
 			rc = -1;
+		if (auth_alg == ODP_AUTH_ALG_MD5_96 &&
+		    !(capability.auths.bit.null))
+			rc = -1;
+		if (auth_alg == ODP_AUTH_ALG_SHA256_128 &&
+		    !(capability.auths.bit.null))
+			rc = -1;
 	}
 
 	CU_ASSERT(!rc);