Class DefaultXMLMessageSignatureValidator
java.lang.Object
se.idsec.signservice.security.sign.xml.impl.DefaultXMLMessageSignatureValidator
- All Implemented Interfaces:
XMLMessageSignatureValidator
public class DefaultXMLMessageSignatureValidator
extends Object
implements XMLMessageSignatureValidator
Implementation of the
XMLMessageSignatureValidator interface.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidate(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.
-
Constructor Details
-
DefaultXMLMessageSignatureValidator
public DefaultXMLMessageSignatureValidator()Default constructor.
-
-
Method Details
-
validate
public 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
expectedSignerCertificatesisnullor empty no checking of the signer certificate will be performed.If
signatureLocationisnulland the document contains more than one Signature element the validation will fail.- Specified by:
validatein interfaceXMLMessageSignatureValidator- Parameters:
document- the XML document to validateexpectedSignerCertificates- the expected signer certificatessignatureLocation- the signature location- Throws:
SignatureException- for validation errors
-