aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java
diff options
context:
space:
mode:
authorpeter.danner <peter.danner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-04-24 08:14:45 +0000
committerpeter.danner <peter.danner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-04-24 08:14:45 +0000
commite226bfd7d2d2636745630f9d92ad2fed7186458b (patch)
tree2f84a3d4b3af49cb39b6791b32842880bda04880 /spss.server/src/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java
parentb73ce7d7786f999fe17da9431328dc9d673d8f10 (diff)
downloadmoa-id-spss-e226bfd7d2d2636745630f9d92ad2fed7186458b.tar.gz
moa-id-spss-e226bfd7d2d2636745630f9d92ad2fed7186458b.tar.bz2
moa-id-spss-e226bfd7d2d2636745630f9d92ad2fed7186458b.zip
updated usage of RFC2253NameParser
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@816 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java')
-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;
}
/**