From dfb14689d6d7b5db8f518d8e908571e29ca7afe1 Mon Sep 17 00:00:00 2001 From: tknall Date: Wed, 1 Dec 2010 15:44:23 +0000 Subject: Splitting Names like "serialNumber=xxx,CN=Abteilung,OU=Unterorganisation\, die der Organisation untergeordnet ist,O=Organisation,C=AT" fixed. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@663 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../egiz/sig/connectors/bku/SignSignatureObject.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/knowcenter/wag/egov') 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 5425baa..09b7e6b 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 @@ -109,7 +109,7 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo */ public String getName() { - return this.x509Certificate.getSubjectDN().getName(); + return this.x509Certificate.getSubjectDN().toString(); } /** @@ -205,12 +205,24 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo private void fillDNMap(String dn, Map dnMap) { - String[] arr = dn.split("\\s*(,|;)\\s*"); + // split at "," but not at "\," + String[] arr = dn.split("\\s*(? , + entry[1] = entry[1].replaceAll("\\\\+", "+"); // \+ -> + + entry[1] = entry[1].replaceAll("\\\\\"", "\""); // \" -> " + entry[1] = entry[1].replaceAll("\\\\\\\\", "\\"); // \\ -> \ + entry[1] = entry[1].replaceAll("\\\\<,", "<"); // \< -> < + entry[1] = entry[1].replaceAll("\\\\>", ">"); // \> -> > + entry[1] = entry[1].replaceAll("\\\\;", ";"); // \; -> ; + entry[1] = entry[1].replaceAll("\\\\#", "#"); // \# -> # + dnMap.put(entry[0], entry[1]); } } - } -- cgit v1.2.3