aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-11-30 18:20:55 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-11-30 18:20:55 +0000
commit6feffb896cd9026481717a06ac754c94f25c0751 (patch)
treeb3a1c87f73d316ea5e703cc86e2e4f16daa1d5d8 /src/main/java/at/knowcenter/wag/egov
parent9cb6c50352c29d136c82e24640dec8e0ba4b2ffb (diff)
downloadpdf-as-3-6feffb896cd9026481717a06ac754c94f25c0751.tar.gz
pdf-as-3-6feffb896cd9026481717a06ac754c94f25c0751.tar.bz2
pdf-as-3-6feffb896cd9026481717a06ac754c94f25c0751.zip
OID-Map added in order to support all commons subject DNs
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@655 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/SignSignatureObject.java29
1 files changed, 25 insertions, 4 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 f857fb0..e90f491 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
@@ -9,6 +9,8 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+import javax.security.auth.x500.X500Principal;
+
import at.gv.egiz.pdfas.api.timestamp.TimeStamper;
import at.knowcenter.wag.egov.egiz.sig.SignatureTypes;
import at.knowcenter.wag.egov.egiz.sig.signatureobject.AdditionalSignatureInformation;
@@ -38,6 +40,25 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo
public String sigTimeStamp;
+ private final static Map OIDMAP;
+
+ static {
+ OIDMAP = new HashMap();
+ OIDMAP.put("2.5.4.4", "SN");
+ OIDMAP.put("2.5.4.5", "serialNumber");
+ OIDMAP.put("2.5.4.6", "C");
+ OIDMAP.put("2.5.4.7", "L");
+ OIDMAP.put("2.5.4.8", "ST");
+ OIDMAP.put("2.5.4.9", "STREET");
+ OIDMAP.put("2.5.4.10", "O");
+ OIDMAP.put("2.5.4.11", "OU");
+ OIDMAP.put("2.5.4.12", "T");
+ OIDMAP.put("2.5.4.42", "givenName");
+ OIDMAP.put("2.5.4.43", "initials");
+ OIDMAP.put("2.5.4.45", "uniqueIdentifier");
+ OIDMAP.put("2.5.4.65", "pseudonym");
+ }
+
/**
* This is used to transport the response properties to the Detached signator.
*/
@@ -174,8 +195,8 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo
public Map getSubjectDNMap() {
if (this.subjectDNMap.size() == 0) {
- if (this.getX509Certificate() != null) {
- fillDNMap(this.getX509Certificate().getSubjectX500Principal().getName(), this.subjectDNMap);
+ if (this.getX509Certificate() != null) {
+ fillDNMap(this.getX509Certificate().getSubjectX500Principal().getName(X500Principal.RFC2253, OIDMAP), this.subjectDNMap);
}
}
return this.subjectDNMap;
@@ -200,7 +221,7 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo
public Map getIssuerDNMap() {
if (this.issuerDNMap.size() == 0) {
if (this.getX509Certificate() != null) {
- fillDNMap(this.getX509Certificate().getIssuerX500Principal().getName(), this.issuerDNMap);
+ fillDNMap(this.getX509Certificate().getIssuerX500Principal().getName(X500Principal.RFC2253, OIDMAP), this.issuerDNMap);
}
}
return this.issuerDNMap;
@@ -209,7 +230,7 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo
public String certIssuerDNPart(String key) {
if (this.issuerDNMap.size() == 0) {
if (this.getX509Certificate() != null) {
- fillDNMap(this.getX509Certificate().getIssuerX500Principal().getName(), this.issuerDNMap);
+ fillDNMap(this.getX509Certificate().getIssuerX500Principal().getName(X500Principal.RFC2253, OIDMAP), this.issuerDNMap);
}
}
return (String)this.getIssuerDNMap().get(key);