diff --git a/test/data/fapi/P_ECC.json b/test/data/fapi/P_ECC.json index f556a82d6..ebabb80eb 100644 --- a/test/data/fapi/P_ECC.json +++ b/test/data/fapi/P_ECC.json @@ -22,9 +22,6 @@ "pcr_selection": [ { "hash": "TPM2_ALG_SHA256", "pcrSelect": [ 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] - }, - { "hash": "TPM2_ALG_SHA384", - "pcrSelect": [ ], } ], "curveID": "TPM2_ECC_NIST_P256", diff --git a/test/data/fapi/P_ECC_error.json b/test/data/fapi/P_ECC_error.json index b55170b16..1195103fe 100644 --- a/test/data/fapi/P_ECC_error.json +++ b/test/data/fapi/P_ECC_error.json @@ -22,9 +22,6 @@ "pcr_selection": [ { "hash": "TPM2_ALG_SHA256", "pcrSelect": [ 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] - }, - { "hash": "TPM2_ALG_SHA384", - "pcrSelect": [ ], } ], "curveID": "TPM2_ECC_NIST_P256", diff --git a/test/data/fapi/P_ECC_sh_eh_policy.json b/test/data/fapi/P_ECC_sh_eh_policy.json index 0ff6125f6..b25c1a91a 100644 --- a/test/data/fapi/P_ECC_sh_eh_policy.json +++ b/test/data/fapi/P_ECC_sh_eh_policy.json @@ -20,9 +20,6 @@ "pcr_selection": [ { "hash": "TPM2_ALG_SHA256", "pcrSelect": [ 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] - }, - { "hash": "TPM2_ALG_SHA384", - "pcrSelect": [ ], } ], "curveID": "TPM2_ECC_NIST_P256", diff --git a/test/data/fapi/P_RSA.json b/test/data/fapi/P_RSA.json index 6f7fb1f2b..11a7084ad 100644 --- a/test/data/fapi/P_RSA.json +++ b/test/data/fapi/P_RSA.json @@ -28,9 +28,6 @@ "pcr_selection": [ { "hash": "TPM2_ALG_SHA256", "pcrSelect": [ 8, 9 , 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] - }, - { "hash": "TPM2_ALG_SHA384", - "pcrSelect": [ ] } ], "exponent": 0, diff --git a/test/data/fapi/P_RSA2.json b/test/data/fapi/P_RSA2.json index 4c523c277..22c1085b3 100644 --- a/test/data/fapi/P_RSA2.json +++ b/test/data/fapi/P_RSA2.json @@ -28,9 +28,6 @@ "pcr_selection": [ { "hash": "TPM2_ALG_SHA256", "pcrSelect": [ 8, 9 , 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] - }, - { "hash": "TPM2_ALG_SHA384", - "pcrSelect": [ ] } ], "exponent": 0, diff --git a/test/data/fapi/P_RSA256.json b/test/data/fapi/P_RSA256.json index d403f67a1..9bb464ecd 100644 --- a/test/data/fapi/P_RSA256.json +++ b/test/data/fapi/P_RSA256.json @@ -34,9 +34,6 @@ "pcr_selection": [ { "hash": "TPM2_ALG_SHA256", "pcrSelect": [ 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] - }, - { "hash": "TPM2_ALG_SHA384", - "pcrSelect": [ ] } ], "exponent": 0, diff --git a/test/data/fapi/P_RSA_nameAlg_sha1.json b/test/data/fapi/P_RSA_nameAlg_sha1.json index 11306b7d3..bd2547d5d 100644 --- a/test/data/fapi/P_RSA_nameAlg_sha1.json +++ b/test/data/fapi/P_RSA_nameAlg_sha1.json @@ -34,9 +34,6 @@ "pcr_selection": [ { "hash": "TPM2_ALG_SHA256", "pcrSelect": [ 8, 9 , 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] - }, - { "hash": "TPM2_ALG_SHA384", - "pcrSelect": [ ] } ], "exponent": 0, diff --git a/test/data/fapi/P_RSA_sh_policy.json b/test/data/fapi/P_RSA_sh_policy.json index aa06d9dee..75355f832 100644 --- a/test/data/fapi/P_RSA_sh_policy.json +++ b/test/data/fapi/P_RSA_sh_policy.json @@ -28,10 +28,7 @@ "pcr_selection": [ { "hash": "TPM2_ALG_SHA256", "pcrSelect": [ 8, 9 , 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] - }, - { "hash": "TPM2_ALG_SHA384", - "pcrSelect": [ ] - } + } ], "exponent": 0, "keyBits": 2048, diff --git a/test/data/fapi/policy/pol_signed.json b/test/data/fapi/policy/pol_signed.json index a6ed7b2e0..f613f6f36 100644 --- a/test/data/fapi/policy/pol_signed.json +++ b/test/data/fapi/policy/pol_signed.json @@ -6,7 +6,7 @@ "publicKeyHint": "Test key hint", // private key: test/data/fapi/policy/rsa2.pem "keyPEM": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoGL6IrCSAznmIIzBessI\nmW7tPOUy78uWTIaub32KnYHn78KXprrZ3ykp6WDrOQeMjv4AA+14mJbg77apVYXy\nEnkFdOMa1hszSJnp6cJvx7ILngLvFUxzbVki\/ehvgS3nRk67Njal+nMTe8hpe3UK\nQeV\/Ij+F0r6Yz91W+4LPmncAiUesRZLetI2BZsKwHYRMznmpIYpoua1NtS8QpEXR\nMmsUue19eS\/XRAPmmCfnb5BX2Tn06iCpk6wO+RfMo9etcX5cLSAuIYEQYCvV2\/0X\nTfEw607vttBN0Y54LrVOKno1vRXd5sxyRlfB0WL42F4VG5TfcJo5u1Xq7k9m9K57\n8wIDAQAB\n-----END PUBLIC KEY-----\n", - "keyPEMhashAlg": "SHA384" + "keyPEMhashAlg": "SHA256" } ] } diff --git a/test/data/fapi/policy/pol_signed_ecc.json b/test/data/fapi/policy/pol_signed_ecc.json index 9021535d5..e777d3c54 100644 --- a/test/data/fapi/policy/pol_signed_ecc.json +++ b/test/data/fapi/policy/pol_signed_ecc.json @@ -5,7 +5,7 @@ "type": "POLICYSIGNED", // private key: test/data/fapi/policy/ecc.pem "keyPEM": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoJTa3zftdAzHC96IjpqQ/dnLm+p7\npEiLMi03Jd0oP0aYnnXFjolzIB/dBZ/t+BLh0PwLM5aAM/jugeLkHgpIyQ==\n-----END PUBLIC KEY-----\n", - "keyPEMhashAlg": "SHA384" + "keyPEMhashAlg": "SHA256" } ] } diff --git a/test/integration/fapi-data-crypt.int.c b/test/integration/fapi-data-crypt.int.c index 0b83f404f..6a174a405 100644 --- a/test/integration/fapi-data-crypt.int.c +++ b/test/integration/fapi-data-crypt.int.c @@ -110,8 +110,8 @@ signatureCallback( return TSS2_FAPI_RC_GENERAL_FAILURE; } - if (hashAlg != TPM2_ALG_SHA384) { - LOG_ERROR("hashAlg is not correct, %u != %u", hashAlg, TPM2_ALG_SHA384); + if (hashAlg != TPM2_ALG_SHA256) { + LOG_ERROR("hashAlg is not correct, %u != %u", hashAlg, TPM2_ALG_SHA256); return TSS2_FAPI_RC_GENERAL_FAILURE; } @@ -121,7 +121,7 @@ signatureCallback( EVP_MD_CTX *mdctx =NULL; EVP_PKEY_CTX *pctx = NULL; - const EVP_MD *ossl_hash = EVP_sha384(); + const EVP_MD *ossl_hash = EVP_sha256(); chknull(ossl_hash); LOGBLOB_DEBUG(dataToSign, dataToSignSize, "Data to be signed"); diff --git a/test/integration/fapi-key-create-policy-signed.int.c b/test/integration/fapi-key-create-policy-signed.int.c index 4723a49bc..054aa5c42 100644 --- a/test/integration/fapi-key-create-policy-signed.int.c +++ b/test/integration/fapi-key-create-policy-signed.int.c @@ -123,8 +123,8 @@ signatureCallback( return TSS2_FAPI_RC_GENERAL_FAILURE; } - if (hashAlg != TPM2_ALG_SHA384) { - LOG_ERROR("hashAlg is not correct, %u != %u", hashAlg, TPM2_ALG_SHA384); + if (hashAlg != TPM2_ALG_SHA256) { + LOG_ERROR("hashAlg is not correct, %u != %u", hashAlg, TPM2_ALG_SHA256); return TSS2_FAPI_RC_GENERAL_FAILURE; } @@ -134,7 +134,7 @@ signatureCallback( EVP_MD_CTX *mdctx = NULL; EVP_PKEY_CTX *pctx = NULL; - const EVP_MD *ossl_hash = EVP_sha384(); + const EVP_MD *ossl_hash = EVP_sha256(); chknull(ossl_hash); LOGBLOB_DEBUG(dataToSign, dataToSignSize, "Data to be signed");