aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at/gv/egovernment/moa/spss/server
diff options
context:
space:
mode:
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server')
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java b/spss.server/src/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java
index 9d9262785..0814c90d6 100644
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java
@@ -33,14 +33,24 @@ public class IssuerAndSerial {
* @param serial The serial number of the certificate.
*/
public IssuerAndSerial(Principal issuer, BigInteger serial) {
- RFC2253NameParser parser = new RFC2253NameParser(issuer.getName());
-
- try {
- this.issuerDN = ((Name) parser.parse()).getRFC2253String();
- } catch (RFC2253NameParserException e) {
- this.issuerDN = issuer.getName();
+ String issuerDN = null;
+ if (issuer instanceof Name) {
+ try {
+ issuerDN = ((Name)issuer).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ // do nothing
+ }
+ }
+ if (issuerDN == null) {
+ RFC2253NameParser parser = new RFC2253NameParser(issuer.getName());
+ try {
+ issuerDN = ((Name)parser.parse()).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ issuerDN = issuer.getName();
+ }
}
this.serial = serial;
+ this.issuerDN = issuerDN;
}
/**