mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-20 03:45:02 +00:00
BC provider throws different error message on signature validation failure
This commit is contained in:
parent
5e3b6ab82b
commit
74eeecf91b
@ -128,7 +128,11 @@ public class SamlMetadataGeneratorTests extends IdpSamlTestCase {
|
|||||||
//no exception thrown
|
//no exception thrown
|
||||||
SignatureException e = expectThrows(SignatureException.class,
|
SignatureException e = expectThrows(SignatureException.class,
|
||||||
() -> SignatureValidator.validate(signature, readCredentials("RSA", 2048)));
|
() -> SignatureValidator.validate(signature, readCredentials("RSA", 2048)));
|
||||||
|
if (inFipsJvm()) {
|
||||||
|
assertThat(e.getMessage(), containsString("Signature cryptographic validation not successful"));
|
||||||
|
} else {
|
||||||
assertThat(e.getMessage(), containsString("Unable to evaluate key against signature"));
|
assertThat(e.getMessage(), containsString("Unable to evaluate key against signature"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user