From 7e640d854379c051c0f165f0b3e4e76833a020b5 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Fri, 1 Apr 2022 18:41:36 +0200 Subject: fix(pki): change IssuerName nomalization to fix invalid loading of CRLRetention intervalle configuration --- .../egovernment/moa/spss/server/config/ConfigurationProvider.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java index 64bd066..4596109 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java @@ -47,6 +47,8 @@ import at.gv.egovernment.moaspss.util.DOMUtils; import at.gv.egovernment.moaspss.util.MiscUtil; import iaik.asn1.structures.Name; import iaik.pki.revocation.RevocationSourceTypes; +import iaik.pki.utils.NameUtils; +import iaik.pki.utils.UtilsException; import iaik.utils.RFC2253NameParser; import iaik.utils.RFC2253NameParserException; @@ -724,16 +726,14 @@ public class ConfigurationProvider { */ public Set getDistributionPoints(X509Certificate cert) { try { - final RFC2253NameParser nameParser = - new RFC2253NameParser(cert.getIssuerDN().toString()); - final String caIssuerDN = nameParser.parse().getName(); + final String caIssuerDN = NameUtils.getNormalizedName((Name)cert.getIssuerDN()); final Set dps = (Set) distributionPoints.get(caIssuerDN); if (dps == null) { return Collections.EMPTY_SET; } return dps; - } catch (final RFC2253NameParserException e) { + } catch (final UtilsException e) { return Collections.EMPTY_SET; } } -- cgit v1.2.3