From 6cf100df51539210b9115fe74f27ff5b139a5cfc Mon Sep 17 00:00:00 2001
From: Alexey Makhalov <amakhalov@vmware.com>
Date: Fri, 22 Dec 2017 15:54:02 -0800
Subject: [PATCH] Allow some algo tests for FIPS

---
 crypto/testmgr.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 7125ba38..1729c52a 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -2357,6 +2357,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 	}, {
 		.alg = "authenc(hmac(md5),ecb(cipher_null))",
 		.test = alg_test_aead,
+                .fips_allowed = 1,
 		.suite = {
 			.aead = {
 				.enc = __VECS(hmac_md5_ecb_cipher_null_enc_tv_template),
@@ -2375,6 +2376,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 	}, {
 		.alg = "authenc(hmac(sha1),cbc(des))",
 		.test = alg_test_aead,
+                .fips_allowed = 1,
 		.suite = {
 			.aead = {
 				.enc = __VECS(hmac_sha1_des_cbc_enc_tv_temp)
@@ -2396,6 +2398,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 	}, {
 		.alg = "authenc(hmac(sha1),ecb(cipher_null))",
 		.test = alg_test_aead,
+                .fips_allowed = 1,
 		.suite = {
 			.aead = {
 				.enc = __VECS(hmac_sha1_ecb_cipher_null_enc_tv_temp),
@@ -2435,6 +2438,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 	}, {
 		.alg = "authenc(hmac(sha256),cbc(des))",
 		.test = alg_test_aead,
+                .fips_allowed = 1,
 		.suite = {
 			.aead = {
 				.enc = __VECS(hmac_sha256_des_cbc_enc_tv_temp)
@@ -2460,6 +2464,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 	}, {
 		.alg = "authenc(hmac(sha384),cbc(des))",
 		.test = alg_test_aead,
+                .fips_allowed = 1,
 		.suite = {
 			.aead = {
 				.enc = __VECS(hmac_sha384_des_cbc_enc_tv_temp)
@@ -2494,6 +2499,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 	}, {
 		.alg = "authenc(hmac(sha512),cbc(des))",
 		.test = alg_test_aead,
+                .fips_allowed = 1,
 		.suite = {
 			.aead = {
 				.enc = __VECS(hmac_sha512_des_cbc_enc_tv_temp)
@@ -3193,6 +3199,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 		.alg = "jitterentropy_rng",
 		.fips_allowed = 1,
 		.test = alg_test_null,
+                .fips_allowed = 1,
 	}, {
 		.alg = "kw(aes)",
 		.test = alg_test_skcipher,
@@ -3373,6 +3380,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 	}, {
 		.alg = "rfc4543(gcm(aes))",
 		.test = alg_test_aead,
+                .fips_allowed = 1,
 		.suite = {
 			.aead = {
 				.enc = __VECS(aes_gcm_rfc4543_enc_tv_template),
@@ -3391,6 +3399,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 	}, {
 		.alg = "rfc7539esp(chacha20,poly1305)",
 		.test = alg_test_aead,
+                .fips_allowed = 1,
 		.suite = {
 			.aead = {
 				.enc = __VECS(rfc7539esp_enc_tv_template),
@@ -3587,6 +3596,7 @@ static const struct alg_test_desc alg_test_descs[] = {
 	}, {
 		.alg = "xts(twofish)",
 		.test = alg_test_skcipher,
+                .fips_allowed = 1,
 		.suite = {
 			.cipher = {
 				.enc = __VECS(tf_xts_enc_tv_template),
-- 
2.11.0