From bf6a76a3406aa000782d6ee496daab1fcd6354ff Mon Sep 17 00:00:00 2001 From: ferbas Date: Fri, 13 Nov 2009 13:14:07 +0000 Subject: baik, timestamp, ognl git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@413 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../sig/connectors/bku/SignSignatureObject.java | 42 ++++++++++------------ 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/SignSignatureObject.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/SignSignatureObject.java index 1d7895e..4a88f4f 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/SignSignatureObject.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/SignSignatureObject.java @@ -5,14 +5,11 @@ package at.knowcenter.wag.egov.egiz.sig.connectors.bku; import java.io.Serializable; import java.security.cert.X509Certificate; -import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Properties; -import org.apache.tools.ant.taskdefs.Length; - -import at.gv.egiz.pdfas.algorithmSuite.AlgorithmSuiteUtil; +import at.gv.egiz.pdfas.api.timestamp.TimeStamper; import at.knowcenter.wag.egov.egiz.sig.SignatureTypes; import at.knowcenter.wag.egov.egiz.sig.signatureobject.AdditionalSignatureInformation; import at.knowcenter.wag.egov.egiz.sig.signatureobject.AlgorithmSignatureInformation; @@ -39,6 +36,8 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo public String sigAlgorithm; + public String sigTimeStamp; + /** * This is used to transport the response properties to the Detached signator. */ @@ -52,6 +51,10 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo *

*/ public X509Certificate x509Certificate = null; + + // dferbas + private Map subjectDNMap = new HashMap(); + private Map issuerDNMap = new HashMap(); /** * @see at.knowcenter.wag.egov.egiz.sig.signatureobject.MandatorySignatureInformation#getDate() @@ -166,22 +169,9 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo throw new RuntimeException("The key '" + sigKey + "' is not a recognized SignatorObject member."); //$NON-NLS-1$ //$NON-NLS-2$ } -// public String certSubjectDNPart(String key) { -// String val = null; -// if (subjectDNMap == null) { -// if (this.getX509Certificate() != null) { -// val = extractDNPart(key, this.getX509Certificate().getSubjectX500Principal().getName()); -// } -// return val; -// } -// -// public String certIssuerDNPart(String key) { -// String val = null; -// if (this.getX509Certificate() != null) { -// val = extractDNPart(key, this.getX509Certificate().getIssuerX500Principal().getName()); -// } -// return val; -// } + // dferbas + + public String certSubjectDNPart(String key) { if (this.subjectDNMap.size() == 0) { @@ -193,6 +183,15 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo } + /** + * Get a timestamp if available as b64 string + * @see TimeStamper + * @return + */ + public String getSigTimeStamp() { + return this.sigTimeStamp; + } + public String certIssuerDNPart(String key) { if (this.issuerDNMap.size() == 0) { if (this.getX509Certificate() != null) { @@ -202,9 +201,6 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo return this.issuerDNMap.get(key).toString(); } - private Map subjectDNMap = new HashMap(); - private Map issuerDNMap = new HashMap(); - private void fillDNMap(String dn, Map dnMap) { String[] arr = dn.split("\\s*(,|;)\\s*"); -- cgit v1.2.3