Interface XMLMessageSignatureValidator
- All Known Implementing Classes:
DefaultXMLMessageSignatureValidator
public interface XMLMessageSignatureValidator
A validator for validing an XML message that is signed. This is a simpler validator that the
XMLSignatureValidator
that can handle signed XML objects containing more than one signature. The
XMLMessageSignatureValidator
is intended to be used when verifying the signature on a received XML message.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
validate
(Document document, List<X509Certificate> expectedSignerCertificates, XMLSignatureLocation signatureLocation) Validates the signature on the supplied XML document and asserts that it was signed by any of the supplied certificates.
-
Method Details
-
validate
void validate(Document document, List<X509Certificate> expectedSignerCertificates, XMLSignatureLocation signatureLocation) throws SignatureException Validates the signature on the supplied XML document and asserts that it was signed by any of the supplied certificates.If
expectedSignerCertificates
isnull
or empty no checking of the signer certificate will be performed.If
signatureLocation
isnull
and the document contains more than one Signature element the validation will fail.- Parameters:
document
- the XML document to validateexpectedSignerCertificates
- the expected signer certificatessignatureLocation
- the signature location- Throws:
SignatureException
- for validation errors
-