diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/SignSignatureObject.java | 19 |
1 files changed, 18 insertions, 1 deletions
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 eb800d8..74ced09 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 @@ -208,7 +208,24 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo public Map getSubjectDNMap() {
if (this.subjectDNMap.size() == 0 && this.getX509Certificate() != null) {
- fillDNMap(this.getX509Certificate().getSubjectDN().getName(), this.subjectDNMap);
+ //rpiazzi workaround
+ //the problem with atrust encoding special characters (Sonderzeichen) wrong
+ //led to this workaround. As special characters are of the form e.g. "&#xxx;"
+ //Example: for "Georg Müller" atrust returns "Georg Müller"
+ //By calling this.getX509Certificate().getSubjectDN().getName() you get "Georg Mü\;ller",
+ //After that the down called method fillDNMap replaces the "\" with a "+"
+ //Because of this the workaround in at.gv.egiz.pdfas.impl.signator.binary.BinarySignator_1_0_0.fillReplacesWithValues()
+ //which replaces the wrong codes of atrust with the special chars does not work
+ //------------------------------------------------------------------------------
+ //The workaround here is to call this.getX509Certificate().getSubjectDN.toString()
+ //instead of this.getX509Certificate().getSubjectDN.getName()
+ if (this.getX509Certificate().getSubjectDN().toString().contains(";")) {
+ fillDNMap(this.getX509Certificate().getSubjectDN().toString(), this.subjectDNMap);
+ }
+ else {
+ fillDNMap(this.getX509Certificate().getSubjectDN().getName(), this.subjectDNMap);
+ }
+ //end workaround
}
return this.subjectDNMap;
}
|