From 980f8a0933eaaea7b1e13ec849a7dde5e447804b Mon Sep 17 00:00:00 2001 From: ferbas Date: Fri, 13 Nov 2009 13:11:55 +0000 Subject: baik: timestamp, /alg git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@410 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../wag/egov/egiz/sig/SignatureObject.java | 47 +++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/knowcenter/wag/egov/egiz') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java index 101c79e..289a441 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java @@ -123,6 +123,8 @@ public class SignatureObject implements Serializable public static final String SIG_CER_DIG = "SIG_CER_DIG"; private X509Cert x509Cert_ = null; + + private String timeStamp = null; // public static final String SIG_RES = "SIG_RES"; // dummy value for debugging only @@ -626,6 +628,26 @@ public class SignatureObject implements Serializable return getSigValue(SignatureTypes.SIG_NUMBER); } + // dferbas baik + + /** + * signature algorithm if embedded + * @param sigAlg + */ + public void setSigAlg(String sigAlg) + { + setSigValue(SignatureTypes.SIG_ALG, sigAlg); + } + + /** + * signature algorithm if embedded + * @return + */ + public String getSigAlg() + { + return getSigValue(SignatureTypes.SIG_ALG); + } + /** * @param certDigest * set the digest value for the X509Certificate @@ -1630,7 +1652,7 @@ public class SignatureObject implements Serializable * @return Returns the list of SignatureFieldDefinitions that's values in the * SignatureObject have been filled out with placeholders. */ - public List fillValues(final char placeholder, boolean has_SIG_ID) + public List fillValues(final char placeholder, boolean has_SIG_ID, boolean baikEnabled) { List variable_fields = new ArrayList(); @@ -1647,6 +1669,11 @@ public class SignatureObject implements Serializable setValueBruteForce(SignatureTypes.SIG_ID, null); continue; } + + if (sfd.field_name.equals(SignatureTypes.SIG_ALG) && !baikEnabled) { + setValueBruteForce(SignatureTypes.SIG_ID, null); + continue; + } char[] placeholder_chars = new char[sfd.placeholder_length]; for (int i = 0; i < placeholder_chars.length; i++) @@ -1690,8 +1717,26 @@ public class SignatureObject implements Serializable { this.raw_signature_response = raw_response_string; } + + /** + * get timestamp if available + * @return + */ + public String getTimeStamp() { + return this.timeStamp; + } + + /** + * set timestamp + * @param timeStamp + */ + public void setTimeStamp(String timeStamp) { + this.timeStamp = timeStamp; + } + +/** * The toString method, used for tests or debugging. */ public String toString() -- cgit v1.2.3