diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/SignSignatureObject.java | 65 |
1 files changed, 16 insertions, 49 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 e90f491..5425baa 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,8 +9,6 @@ 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;
@@ -40,25 +38,6 @@ 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.
*/
@@ -192,47 +171,35 @@ public class SignSignatureObject implements Serializable, MandatorySignatureInfo // dferbas
+
+ /**
+ * Get a timestamp if available as b64 string
+ * @see TimeStamper
+ * @return
+ */
+ public String getSigTimeStamp() {
+ return this.sigTimeStamp;
+ }
public Map getSubjectDNMap() {
- if (this.subjectDNMap.size() == 0) {
- if (this.getX509Certificate() != null) {
- fillDNMap(this.getX509Certificate().getSubjectX500Principal().getName(X500Principal.RFC2253, OIDMAP), this.subjectDNMap);
- }
+ if (this.subjectDNMap.size() == 0 && this.getX509Certificate() != null) {
+ fillDNMap(this.getX509Certificate().getSubjectDN().getName(), this.subjectDNMap);
}
- return this.subjectDNMap;
-
+ return this.subjectDNMap;
}
- public String certSubjectDNPart(String key) {
-
+ public String certSubjectDNPart(String key) {
return (String)this.getSubjectDNMap().get(key);
}
-
- /**
- * Get a timestamp if available as b64 string
- * @see TimeStamper
- * @return
- */
- public String getSigTimeStamp() {
- return this.sigTimeStamp;
- }
-
public Map getIssuerDNMap() {
- if (this.issuerDNMap.size() == 0) {
- if (this.getX509Certificate() != null) {
- fillDNMap(this.getX509Certificate().getIssuerX500Principal().getName(X500Principal.RFC2253, OIDMAP), this.issuerDNMap);
- }
+ if (this.issuerDNMap.size() == 0 && this.getX509Certificate() != null) {
+ fillDNMap(this.getX509Certificate().getIssuerDN().getName(), this.issuerDNMap);
}
return this.issuerDNMap;
}
- public String certIssuerDNPart(String key) {
- if (this.issuerDNMap.size() == 0) {
- if (this.getX509Certificate() != null) {
- fillDNMap(this.getX509Certificate().getIssuerX500Principal().getName(X500Principal.RFC2253, OIDMAP), this.issuerDNMap);
- }
- }
+ public String certIssuerDNPart(String key) {
return (String)this.getIssuerDNMap().get(key);
}
|