diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java')
-rw-r--r-- | pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java | 75 |
1 files changed, 35 insertions, 40 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java b/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java index b340ea236..b7c3f6329 100644 --- a/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java +++ b/pki/base/common/src/com/netscape/cmscore/cert/OidLoaderSubsystem.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmscore.cert; - import java.security.cert.CertificateException; import java.util.Enumeration; @@ -38,7 +37,6 @@ import com.netscape.certsrv.base.IConfigStore; import com.netscape.certsrv.base.ISubsystem; import com.netscape.cmscore.util.Debug; - /** * * @author stevep @@ -47,7 +45,7 @@ import com.netscape.cmscore.util.Debug; public class OidLoaderSubsystem implements ISubsystem { private IConfigStore mConfig = null; - public static final String ID = "oidmap"; + public static final String ID = "oidmap"; private String mId = ID; private static final String PROP_OID = "oid"; @@ -77,61 +75,58 @@ public class OidLoaderSubsystem implements ISubsystem { public static OidLoaderSubsystem getInstance() { return mInstance; } - + private static final int CertType_data[] = { 2, 16, 840, 1, 113730, 1, 1 }; /** * Identifies the particular public key used to sign the certificate. */ public static final ObjectIdentifier CertType_Id = new - ObjectIdentifier(CertType_data); + ObjectIdentifier(CertType_data); private static final String[][] oidMapEntries = new String[][] { - {NSCertTypeExtension.class.getName(), - CertType_Id.toString(), - NSCertTypeExtension.NAME}, - {CertificateRenewalWindowExtension.class.getName(), - CertificateRenewalWindowExtension.ID.toString(), - CertificateRenewalWindowExtension.NAME}, - {CertificateScopeOfUseExtension.class.getName(), - CertificateScopeOfUseExtension.ID.toString(), - CertificateScopeOfUseExtension.NAME}, - {DeltaCRLIndicatorExtension.class.getName(), - DeltaCRLIndicatorExtension.OID, - DeltaCRLIndicatorExtension.NAME}, - {HoldInstructionExtension.class.getName(), - HoldInstructionExtension.OID, - HoldInstructionExtension.NAME}, - {InvalidityDateExtension.class.getName(), - InvalidityDateExtension.OID, - InvalidityDateExtension.NAME}, - {IssuingDistributionPointExtension.class.getName(), - IssuingDistributionPointExtension.OID, - IssuingDistributionPointExtension.NAME}, - {FreshestCRLExtension.class.getName(), - FreshestCRLExtension.OID, - FreshestCRLExtension.NAME}, + { NSCertTypeExtension.class.getName(), + CertType_Id.toString(), + NSCertTypeExtension.NAME }, + { CertificateRenewalWindowExtension.class.getName(), + CertificateRenewalWindowExtension.ID.toString(), + CertificateRenewalWindowExtension.NAME }, + { CertificateScopeOfUseExtension.class.getName(), + CertificateScopeOfUseExtension.ID.toString(), + CertificateScopeOfUseExtension.NAME }, + { DeltaCRLIndicatorExtension.class.getName(), + DeltaCRLIndicatorExtension.OID, + DeltaCRLIndicatorExtension.NAME }, + { HoldInstructionExtension.class.getName(), + HoldInstructionExtension.OID, + HoldInstructionExtension.NAME }, + { InvalidityDateExtension.class.getName(), + InvalidityDateExtension.OID, + InvalidityDateExtension.NAME }, + { IssuingDistributionPointExtension.class.getName(), + IssuingDistributionPointExtension.OID, + IssuingDistributionPointExtension.NAME }, + { FreshestCRLExtension.class.getName(), + FreshestCRLExtension.OID, + FreshestCRLExtension.NAME }, }; /** - * Initializes this subsystem with the given + * Initializes this subsystem with the given * configuration store. * It first initializes resident subsystems, * and it loads and initializes loadable * subsystem specified in the configuration * store. * <P> - * Note that individual subsystem should be - * initialized in a separated thread if - * it has dependency on the initialization - * of other subsystems. + * Note that individual subsystem should be initialized in a separated thread if it has dependency on the initialization of other subsystems. * <P> - * + * * @param owner owner of this subsystem * @param config configuration store */ public synchronized void init(ISubsystem owner, IConfigStore config) - throws EBaseException { + throws EBaseException { if (Debug.ON) { Debug.trace("OIDLoaderSubsystem started"); } @@ -144,8 +139,8 @@ public class OidLoaderSubsystem implements ISubsystem { for (int i = 0; i < oidMapEntries.length; i++) { try { OIDMap.addAttribute(oidMapEntries[i][0], - oidMapEntries[i][1], - oidMapEntries[i][2]); + oidMapEntries[i][1], + oidMapEntries[i][2]); } catch (Exception e) { } } @@ -161,8 +156,8 @@ public class OidLoaderSubsystem implements ISubsystem { String classname = substore.getString(PROP_CLASS); OIDMap.addAttribute(classname, - oidname, - substorename); + oidname, + substorename); } catch (EPropertyNotFound e) { // Log error } catch (CertificateException e) { |