diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/SignSignatureObject.java | 29 |
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);
|