aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify
diff options
context:
space:
mode:
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify')
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java28
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java19
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java17
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java25
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java52
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java21
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java32
7 files changed, 194 insertions, 0 deletions
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java
new file mode 100644
index 000000000..b4ecb3937
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java
@@ -0,0 +1,28 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+/**
+ * Base class for objects containing CMS content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSContent {
+ /**
+ * Indicates that this object contains a reference to the CMS content.
+ */
+ public static final int REFERENCE_CONTENT = 0;
+ /**
+ * Indicates that this object contains the CMS content explicitly.
+ */
+ public static final int EXPLICIT_CONTENT = 1;
+
+ /**
+ * Gets the type of the contained content.
+ *
+ * @return The type of content, either <code>REFERENCE_CONTENT</code> or
+ * <code>EXPLICIT_CONTENT</code>.
+ */
+ public int getContentType();
+
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java
new file mode 100644
index 000000000..58c2b0259
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java
@@ -0,0 +1,19 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import java.io.InputStream;
+
+/**
+ * Encapsulates binary CMS content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSContentExcplicit extends CMSContent {
+ /**
+ * Gets the content as a stream.
+ *
+ * @return A stream containing the binary content.
+ */
+ public InputStream getBinaryContent();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java
new file mode 100644
index 000000000..7c4e6d913
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java
@@ -0,0 +1,17 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+/**
+ * Encapsulates CMS content that is referenced by an URI.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSContentReference extends CMSContent {
+ /**
+ * Gets the reference URI from wher the content can be retrieved.
+ *
+ * @return The reference URI.
+ */
+ public String getReference();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java
new file mode 100644
index 000000000..37f6fd396
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * A data object used for verification of CMS signatures.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSDataObject {
+ /**
+ * Gets the meta information of the content.
+ *
+ * @return An object containig the meta information.
+ */
+ public MetaInfo getMetaInfo();
+ /**
+ * Gets the actual content of the data object.
+ *
+ * @return The actual content.
+ */
+ public CMSContent getContent();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java
new file mode 100644
index 000000000..6d1f389af
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java
@@ -0,0 +1,52 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import java.io.InputStream;
+import java.util.Date;
+
+/**
+ * Object that encapsulates a request to verify a CMS signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyCMSSignatureRequest {
+ /**
+ * Indicates, that signature checks for all signatories must be returned.
+ */
+ public static int[] ALL_SIGNATORIES = new int[] { -1 };
+ /**
+ * Gets the positions of signatories whose signature must be verified.
+ *
+ * @return The positions of signatories.
+ */
+ public int[] getSignatories();
+ /**
+ * Gets the date and time for which the signature verification has to
+ * be performed.
+ *
+ * @return Date and time for which the signature verification has
+ * to be performed.
+ */
+ public Date getDateTime();
+ /**
+ * Gets the binary CMS signature.
+ *
+ * @return An <code>InputStream</code> from which the binary CMS signature
+ * can be read.
+ */
+ public InputStream getCMSSignature();
+ /**
+ * Gets the data object necessary for the verification.
+ *
+ * @return The data object necessary for verification.
+ */
+ public CMSDataObject getDataObject();
+ /**
+ * Gets the profile ID of trusted certificates to be used for signature
+ * verification.
+ *
+ * @return The profile ID of trusted certificates.
+ */
+ public String getTrustProfileId();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java
new file mode 100644
index 000000000..5f2e6d255
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java
@@ -0,0 +1,21 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import java.util.List;
+
+
+/**
+ * Object that encapsulates the response on a request to verify a CMS
+ * signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyCMSSignatureResponse {
+ /**
+ * Gets the response elements.
+ *
+ * @return The response elements.
+ */
+ public List getResponseElements();
+}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java
new file mode 100644
index 000000000..49ddb9419
--- /dev/null
+++ b/spss.server/src/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java
@@ -0,0 +1,32 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Contains detailed information about the verification of a signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyCMSSignatureResponseElement {
+ /**
+ * Gets a SignerInfo element according to CMS.
+ *
+ * @return The SignerInfo element according to CMS.
+ */
+ public SignerInfo getSignerInfo();
+ /**
+ * Gets the result of the signature verification.
+ *
+ * @return The result of the signature verification.
+ */
+ public CheckResult getSignatureCheck();
+ /**
+ * Gets the result of the certificate verification.
+ *
+ * @return The result of the certificate verification.
+ */
+ public CheckResult getCertificateCheck();
+}