package at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api; import java.util.List; import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.ICMSSignatureVerificationResponse; import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IXMLSignatureVerificationResponse; import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MOASigServiceException; public interface ISignatureVerificationService { /** * Verify a CAdES or CMS signature *

* This method only validates the first CMS or CAdES signature of more than one signature exists * * @param signature Enveloped CMS or CAdES signature * @param trustProfileID Id of the Trust-Profile from MOA-Sig configuration * @return @link {@link ICMSSignatureVerificationResponse}, or null if no signature was found * @throws MOASigServiceException on signatue-verification error */ ICMSSignatureVerificationResponse verifyCMSSignature(byte[] signature, String trustProfileID) throws MOASigServiceException; /** * Verify a XML or XAdES signature *

* This method only validates the first XML or XAdES signature of more than one signature exists * * @param signature Serialized XML or XAdES signature * @param trustProfileID Id of the Trust-Profile from MOA-Sig configuration * @return @link {@link IXMLSignatureVerificationResponse}, or null if no signature was found * @throws MOASigServiceException on signatue-verification error */ IXMLSignatureVerificationResponse verifyXMLSignature(byte[] signature, String trustProfileID) throws MOASigServiceException; /** * Verify a XML or XAdES signature *

* This method only validates the first XML or XAdES signature of more than one signature exists * * @param signature Serialized XML or XAdES signature * @param trustProfileID Id of the Trust-Profile from MOA-Sig configuration * @param verifyTransformsInfoProfileID {@link List} of XML Transformations that should be used for signature-verification * @return @link {@link IXMLSignatureVerificationResponse}, or null if no signature was found * @throws MOASigServiceException on signatue-verification error */ IXMLSignatureVerificationResponse verifyXMLSignature(byte[] signature, String trustProfileID, List verifyTransformsInfoProfileID) throws MOASigServiceException; }