diff options
author | rpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2011-11-18 17:25:07 +0000 |
---|---|---|
committer | rpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2011-11-18 17:25:07 +0000 |
commit | 6e80cd5aea391262c90a13a6e77204ca6827be80 (patch) | |
tree | 63e60f15694abcfd5d6f7d76846dfb745412edb9 /src/main/java/at/knowcenter | |
parent | f4a1952fa7ba68366c36d75d3d7233ce9af80259 (diff) | |
download | pdf-as-3-6e80cd5aea391262c90a13a6e77204ca6827be80.tar.gz pdf-as-3-6e80cd5aea391262c90a13a6e77204ca6827be80.tar.bz2 pdf-as-3-6e80cd5aea391262c90a13a6e77204ca6827be80.zip |
Added workaround because the workaround in at.gv.egiz.pdfas.impl.signator.binary.BinarySignator_1_0_0.fillReplacesWithValues()
caused another problem.
For details see the code of this class in the method "getSubjectDNMap()".
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@881 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter')
-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;
}
|