aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/SignatureObject.java47
1 files changed, 46 insertions, 1 deletions
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()