/* * Copyright 2003 Federal Chancellery Austria * MOA-SPSS has been developed in a cooperation between BRZ, the Federal * Chancellery Austria - ICT staff unit, and Graz University of Technology. * * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by * the European Commission - subsequent versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * http://www.osor.eu/eupl/ * * Unless required by applicable law or agreed to in writing, software * distributed under the Licence is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Licence for the specific language governing permissions and * limitations under the Licence. * * This product combines work with different licenses. See the "NOTICE" text * file for details on the various modules and licenses. * The "NOTICE" text file is part of the distribution. Any derivative works * that you distribute must include a readable copy of the "NOTICE" text file. */ package at.gv.egovernment.moa.spss.server.iaik.xmlverify; import java.util.List; import iaik.pki.PKIProfile; import iaik.server.modules.SignatureVerificationProfile; import iaik.server.modules.xmlverify.XMLSignatureVerificationProfile; /** * An object providing auxiliary information for verifying an XML signature. * * @author Patrick Peck * @version $Id$ */ public class XMLSignatureVerificationProfileImpl implements XMLSignatureVerificationProfile { /** Whether to check the Security Layer manifest. */ private boolean checkSecurityLayerManifest; /** Whether to check the XMLDsig manifest. */ private boolean checkXMLDsigManifests; /** The profile for validating the signer certificate. */ private PKIProfile certificateValidationProfile; /** Supplements for the transformations. */ private List transformationSupplements; /** Whether to include hash input data in the response. */ private boolean includeHashInputData; /** Whether to include reference input data in the response. */ private boolean includeReferenceInputData; /** Whether the file URIs are permitted */ private boolean permitFileURIs; /** * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#checkSecurityLayerManifest() */ @Override public boolean checkSecurityLayerManifest() { return checkSecurityLayerManifest; } /** * Set whether to check the references in the Security Layer manifest. * * @param checkSecurityLayerManifest true, if the references in the * Security Layer manifest must be checked. */ public void setCheckSecurityLayerManifest(boolean checkSecurityLayerManifest) { this.checkSecurityLayerManifest = checkSecurityLayerManifest; } /** * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#checkXMLDsigManifests() */ @Override public boolean checkXMLDsigManifests() { return checkXMLDsigManifests; } /** * Sets whether to check the references of all XML Dsig manifests. * * @param checkXMLDSigManifests true, if the references in the XML * Dsig manifest must be checked. */ public void setCheckXMLDsigManifests(boolean checkXMLDSigManifests) { this.checkXMLDsigManifests = checkXMLDSigManifests; } /** * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#getCertificateValidationProfile() */ @Override public PKIProfile getCertificateValidationProfile() { return certificateValidationProfile; } /** * Sets the profile for validating the signer certificate. * * @param certificateValidationProfile The certificate validation profile to * set. */ public void setCertificateValidationProfile(PKIProfile certificateValidationProfile) { this.certificateValidationProfile = certificateValidationProfile; } /** * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#getTransformationSupplements() */ @Override public List getTransformationSupplements() { return transformationSupplements; } /** * Sets the transformation supplements. * * @param transformationSupplements The transformation supplements to set. */ public void setTransformationSupplements(List transformationSupplements) { this.transformationSupplements = transformationSupplements; } /** * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#includeHashInputData() */ @Override public boolean includeHashInputData() { return includeHashInputData; } /** * Set whether to include the hash input data in the result. * * @param includeHashInputData If true, the hash input data will be * returned in the result. */ public void setIncludeHashInputData(boolean includeHashInputData) { this.includeHashInputData = includeHashInputData; } /** * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#includeReferenceInputData() */ @Override public boolean includeReferenceInputData() { return includeReferenceInputData; } /** * Set whether to include the reference input data in the result. * * @param includeReferenceInputData If true, the reference input * data will be included in the result. */ public void setIncludeReferenceInputData(boolean includeReferenceInputData) { this.includeReferenceInputData = includeReferenceInputData; } /** * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#getPermitFileURIs() */ @Override public boolean getPermitFileURIs() { return permitFileURIs; } /** * Set whether the file URIs are permitted or not * * @param permitFileURIs whether the file URIs are permitted or not */ public void setPermitFileURIs(boolean permitFileURIs) { this.permitFileURIs = permitFileURIs; } @Override public String getTargetLevel() { return SignatureVerificationProfile.LEVEL_LTA; } }