diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-12-12 18:45:45 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-12-12 18:45:45 +0000 |
commit | d4054bc283ec8071fa3fce1650526c85bc2c5f98 (patch) | |
tree | 130bd13d6ef6d24b81fd452cd077a647fc948b2d | |
parent | 0165e2dd986389f7c04b48cd0452f73c3d01c10a (diff) | |
download | mocca-d4054bc283ec8071fa3fce1650526c85bc2c5f98.tar.gz mocca-d4054bc283ec8071fa3fce1650526c85bc2c5f98.tar.bz2 mocca-d4054bc283ec8071fa3fce1650526c85bc2c5f98.zip |
Abuse HashDataInput to store common default reference ID
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1252 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
3 files changed, 9 insertions, 8 deletions
diff --git a/STAL/src/main/java/at/gv/egiz/stal/HashDataInput.java b/STAL/src/main/java/at/gv/egiz/stal/HashDataInput.java index 12ca654b..05c9bf1e 100644 --- a/STAL/src/main/java/at/gv/egiz/stal/HashDataInput.java +++ b/STAL/src/main/java/at/gv/egiz/stal/HashDataInput.java @@ -32,15 +32,17 @@ import java.io.InputStream; * @author clemens */ public interface HashDataInput { - + + public final static String CMS_DEF_REFERENCE_ID = "Reference-1"; + public String getReferenceId(); - + public String getMimeType(); - + public String getEncoding(); - + public String getFilename(); - + public InputStream getHashDataInput(); } diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/cms/CMSHashDataInput.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/cms/CMSHashDataInput.java index 6aa37e15..f126e64f 100644 --- a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/cms/CMSHashDataInput.java +++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/cms/CMSHashDataInput.java @@ -8,7 +8,6 @@ import at.gv.egiz.stal.HashDataInput; public class CMSHashDataInput implements HashDataInput { private final static String DEFAULT_FILENAME = "SignatureData"; - private final static String CMS_DEF_REFERENCE_ID = "Reference-1"; private byte[] data; private String mimeType; diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java index 8ba18010..3a2fd4a8 100644 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java @@ -47,6 +47,7 @@ import at.gv.egiz.smcc.SignatureCard.KeyboxName; import at.gv.egiz.smcc.SignatureCardException; import at.gv.egiz.smcc.TimeoutException; import at.gv.egiz.stal.ErrorResponse; +import at.gv.egiz.stal.HashDataInput; import at.gv.egiz.stal.STALRequest; import at.gv.egiz.stal.STALResponse; import at.gv.egiz.stal.SignRequest; @@ -63,7 +64,6 @@ public class SignRequestHandler extends AbstractRequestHandler { private final static String CMS_DEF_SIGNEDINFO_ID = "SignedInfo-1"; private final static String CMS_DEF_OBJECT_ID = "SignatureData-1"; - private final static String CMS_DEF_REFERENCE_ID = "Reference-1"; private static JAXBContext jaxbContext; @@ -110,7 +110,7 @@ public class SignRequestHandler extends AbstractRequestHandler { signedInfo.setId(CMS_DEF_SIGNEDINFO_ID); List<ReferenceType> references = signedInfo.getReference(); ReferenceType reference = new ReferenceType(); - reference.setId(CMS_DEF_REFERENCE_ID); + reference.setId(HashDataInput.CMS_DEF_REFERENCE_ID); reference.setURI(CMS_DEF_OBJECT_ID); references.add(reference); } else { |