[API-NEXT,3/3] test: crypto: remove references to deprecated crypto apis

Message ID 20170307115225.29225-4-dmitry.ereminsolenikov@linaro.org
State New
Headers show
Series
  • deprecated hints proposal
Related show

Commit Message

Dmitry Eremin-Solenikov March 7, 2017, 11:52 a.m.
From: Petri Savolainen <petri.savolainen@linaro.org>


Remove last remaining references to deprecated API definitions.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
 example/ipsec/odp_ipsec_misc.h            | 4 ++--
 example/ipsec/odp_ipsec_sa_db.c           | 4 ++--
 example/ipsec/odp_ipsec_stream.c          | 6 +++---
 test/common_plat/performance/odp_crypto.c | 4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

-- 
2.11.0

Patch hide | download patch | download mbox

diff --git a/example/ipsec/odp_ipsec_misc.h b/example/ipsec/odp_ipsec_misc.h
index e0320eb4..45cb022e 100644
--- a/example/ipsec/odp_ipsec_misc.h
+++ b/example/ipsec/odp_ipsec_misc.h
@@ -98,10 +98,10 @@  int parse_key_string(char *keystring,
 			key->length = key_bits_in / 8;
 
 	} else {
-		if ((alg->u.auth == ODP_AUTH_ALG_MD5_96) &&
+		if ((alg->u.auth == ODP_AUTH_ALG_MD5_HMAC) &&
 		    (KEY_BITS_MD5_96 == key_bits_in))
 			key->length = key_bits_in / 8;
-		else if ((alg->u.auth == ODP_AUTH_ALG_SHA256_128) &&
+		else if ((alg->u.auth == ODP_AUTH_ALG_SHA256_HMAC) &&
 			 (KEY_BITS_SHA256_128 == key_bits_in))
 			key->length = key_bits_in / 8;
 	}
diff --git a/example/ipsec/odp_ipsec_sa_db.c b/example/ipsec/odp_ipsec_sa_db.c
index 28215b5b..10bbcb8f 100644
--- a/example/ipsec/odp_ipsec_sa_db.c
+++ b/example/ipsec/odp_ipsec_sa_db.c
@@ -111,11 +111,11 @@  int create_sa_db_entry(char *input, odp_bool_t cipher)
 			} else {
 				if (0 == strcmp(token, "md5")) {
 					entry->alg.u.auth =
-						ODP_AUTH_ALG_MD5_96;
+						ODP_AUTH_ALG_MD5_HMAC;
 					entry->icv_len	  = 12;
 				} else if (!strcmp(token, "sha256")) {
 					entry->alg.u.auth =
-						ODP_AUTH_ALG_SHA256_128;
+						ODP_AUTH_ALG_SHA256_HMAC;
 					entry->icv_len	  = 16;
 				} else {
 					entry->alg.u.auth = ODP_AUTH_ALG_NULL;
diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c
index 428ec04d..15087cbe 100644
--- a/example/ipsec/odp_ipsec_stream.c
+++ b/example/ipsec/odp_ipsec_stream.c
@@ -227,8 +227,8 @@  odp_packet_t create_ipv4_packet(stream_db_entry_t *stream,
 	/* AH (if specified) */
 	if (entry && (entry == stream->input.entry) &&
 	    (ODP_AUTH_ALG_NULL != entry->ah.alg)) {
-		if (entry->ah.alg != ODP_AUTH_ALG_MD5_96 &&
-		    entry->ah.alg != ODP_AUTH_ALG_SHA256_128)
+		if (entry->ah.alg != ODP_AUTH_ALG_MD5_HMAC &&
+		    entry->ah.alg != ODP_AUTH_ALG_SHA256_HMAC)
 			abort();
 
 		ah = (odph_ahhdr_t *)data;
@@ -424,7 +424,7 @@  odp_bool_t verify_ipv4_packet(stream_db_entry_t *stream,
 			return FALSE;
 		if (odp_be_to_cpu_32(ah->spi) != entry->ah.spi)
 			return FALSE;
-		if (ODP_AUTH_ALG_MD5_96 != entry->ah.alg)
+		if (ODP_AUTH_ALG_MD5_HMAC != entry->ah.alg)
 			abort();
 	} else {
 		if (entry && (ODP_AUTH_ALG_NULL != entry->ah.alg))
diff --git a/test/common_plat/performance/odp_crypto.c b/test/common_plat/performance/odp_crypto.c
index 954bdb79..b3857973 100644
--- a/test/common_plat/performance/odp_crypto.c
+++ b/test/common_plat/performance/odp_crypto.c
@@ -205,7 +205,7 @@  static crypto_alg_config_t algs_config[] = {
 				.data = test_iv,
 				.length = 8,
 			},
-			.auth_alg = ODP_AUTH_ALG_MD5_96,
+			.auth_alg = ODP_AUTH_ALG_MD5_HMAC,
 			.auth_key = {
 				.data = test_key16,
 				.length = sizeof(test_key16)
@@ -217,7 +217,7 @@  static crypto_alg_config_t algs_config[] = {
 		.name = "null-hmac-md5-96",
 		.session = {
 			.cipher_alg = ODP_CIPHER_ALG_NULL,
-			.auth_alg = ODP_AUTH_ALG_MD5_96,
+			.auth_alg = ODP_AUTH_ALG_MD5_HMAC,
 			.auth_key = {
 				.data = test_key16,
 				.length = sizeof(test_key16)