diff --git a/x-pack/plugin/identity-provider/src/test/java/org/elasticsearch/xpack/idp/saml/idp/SamlMetadataGeneratorTests.java b/x-pack/plugin/identity-provider/src/test/java/org/elasticsearch/xpack/idp/saml/idp/SamlMetadataGeneratorTests.java index 9ad762dd6c1..c27ba189aca 100644 --- a/x-pack/plugin/identity-provider/src/test/java/org/elasticsearch/xpack/idp/saml/idp/SamlMetadataGeneratorTests.java +++ b/x-pack/plugin/identity-provider/src/test/java/org/elasticsearch/xpack/idp/saml/idp/SamlMetadataGeneratorTests.java @@ -128,7 +128,11 @@ public class SamlMetadataGeneratorTests extends IdpSamlTestCase { //no exception thrown SignatureException e = expectThrows(SignatureException.class, () -> SignatureValidator.validate(signature, readCredentials("RSA", 2048))); - assertThat(e.getMessage(), containsString("Unable to evaluate key against signature")); + if (inFipsJvm()) { + assertThat(e.getMessage(), containsString("Signature cryptographic validation not successful")); + } else { + assertThat(e.getMessage(), containsString("Unable to evaluate key against signature")); + } } }