All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.idsec.signservice.security.sign.xml.XMLSignatureValidator Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2019-2024 IDsec Solutions AB
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package se.idsec.signservice.security.sign.xml;

import org.w3c.dom.Document;
import se.idsec.signservice.security.sign.SignatureValidationResult;
import se.idsec.signservice.security.sign.SignatureValidator;

import java.security.SignatureException;
import java.util.List;

/**
 * Specialization of the {@link SignatureValidator} for validation of XML signatures.
 *
 * @author Martin Lindström ([email protected])
 * @author Stefan Santesson ([email protected])
 */
public interface XMLSignatureValidator extends SignatureValidator {

  /**
   * Validates the signature(s) of supplied document.
   * 

* If the {@code signatureLocation} parameter is non null only that signature of the document will be validated, even * if there are more signatures. *

* * @param document the document to validate * @param signatureLocation tells where the signature can be found * @return a validation result containing the details from a signature validation * @throws SignatureException for errors during the validation process (pure signature validation errors are * reported in the returned result) */ List validate(final Document document, final XMLSignatureLocation signatureLocation) throws SignatureException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy