From 0872d2d8a64fd701776b272f49222428d8def07f Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 3 Nov 2015 14:38:34 +0100 Subject: initial commit --- .../api/impl/VerifyCMSSignatureRequestImpl.java | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java new file mode 100644 index 0000000..c759f5f --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java @@ -0,0 +1,117 @@ +/* + * 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.api.impl; + +import java.io.InputStream; +import java.util.Date; + +import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject; +import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest; + +/** + * Default implementation of VerifyCMSSignatureRequest. + * + * @author Fatemeh Philippi + * @version $Id$ + */ +public class VerifyCMSSignatureRequestImpl + implements VerifyCMSSignatureRequest { + + /** The indexes of the signatories whose signature should be verified. */ + private int[] signatories; + /** The profile ID of trusted certificates. */ + private String trustProfileId; + /** The data object necessary for signature verification. */ + private CMSDataObject dataObject; + /** The CMS signature to verify. */ + private InputStream cmsSignature; + /** The date for which to verify the signature. */ + private Date dateTime; + + /** + * Sets the indexes of the signatories whose signature should be verified. + * + * @param signatories The indexes of the signatories whose signature should be + * verified. + */ + public void setSignatories(int[] signatories) { + this.signatories = signatories; + } + + public int[] getSignatories() { + return signatories; + } + + /** + * Sets the date for which to verify the signature. + * + * @param dateTime The date for which to verify the signature. + */ + public void setDateTime(Date dateTime) { + this.dateTime = dateTime; + } + + public Date getDateTime() { + return dateTime; + } + + /** + * Sets the CMS signature to verify. + * @param signature The CMS signature to verify. + */ + public void setCMSSignature(InputStream signature) { + this.cmsSignature = signature; + + } + + public InputStream getCMSSignature() { + return cmsSignature; + } + + /** + * Sets the data object necessary for signature verification. + * @param dataObject The data object necessary for signature verification. + */ + public void setDataObject(CMSDataObject dataObject) { + this.dataObject = dataObject; + } + + public CMSDataObject getDataObject() { + return dataObject; + } + + /** + * Sets the profile ID of trusted certificates. + * @param trustProfileId The profile ID of trusted certificates. + */ + public void setTrustProfileId(String trustProfileId) { + this.trustProfileId = trustProfileId; + } + + public String getTrustProfileId() { + return trustProfileId; + } + +} -- cgit v1.2.3