Class OIDMap
java.lang.Object
org.mozilla.jss.netscape.security.x509.OIDMap
This class defines the mapping from OID and name to classes and vice
versa. Used by CertificateExtensions and PKCS10 to get the java
classes associated with a particular OID/name.
- Version:
- 1.12
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
private static final String
private static final String
static final String
private static final String
static final String
static final String
static final String
Location for where the OID/Classes maps are stored on the local system.static final String
File names for where OIDs and Classes are registered for V3 extensions.private static final String
private static final String
private static final org.slf4j.Logger
private static final String
private static final Hashtable
<String, ObjectIdentifier> private static final Hashtable
<ObjectIdentifier, String> private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAttribute
(String className, String oid, String name) Add a name to lookup table.static void
Add an extension to the OIDMap.private static File
certificatePropFile
(String fileName) static Class
<?> Return the java class object associated with the user friendly name.static Class
<?> getClass
(ObjectIdentifier oid) Return the java class object associated with the object identifier..static String
getName
(ObjectIdentifier oid) Return user friendly name associated with the OID.static ObjectIdentifier
Return Object identifier for user friendly name.private static void
loadClassDefault
(Properties props) private static void
private static void
private static void
loadNamesDefault
(Properties props)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
EXTENSIONS_HOME
Location for where the OID/Classes maps are stored on the local system. -
EXTENSIONS_OIDS
File names for where OIDs and Classes are registered for V3 extensions.- See Also:
-
EXTENSIONS_CLASSES
- See Also:
-
ROOT
- See Also:
-
AUTH_KEY_IDENTIFIER
- See Also:
-
SUB_KEY_IDENTIFIER
- See Also:
-
AUTHORITY_INFORMATION_ACCESS_IDENTIFIER
- See Also:
-
SUBJECT_INFORMATION_ACCESS_IDENTIFIER
- See Also:
-
KEY_USAGE
- See Also:
-
PRIVATE_KEY_USAGE
- See Also:
-
POLICY_MAPPINGS
- See Also:
-
SUB_ALT_NAME
- See Also:
-
ISSUER_ALT_NAME
- See Also:
-
BASIC_CONSTRAINTS
- See Also:
-
NAME_CONSTRAINTS
- See Also:
-
POLICY_CONSTRAINTS
- See Also:
-
CERT_POLICIES
- See Also:
-
SUBJ_DIR_ATTR
- See Also:
-
EXT_KEY_USAGE_NAME
- See Also:
-
EXT_INHIBIT_ANY_POLICY_NAME
- See Also:
-
EXT_KEY_USAGE
- See Also:
-
CRL_NUMBER
- See Also:
-
CRL_REASON
- See Also:
-
oid2Name
-
name2OID
-
name2Class
-
-
Constructor Details
-
OIDMap
public OIDMap()
-
-
Method Details
-
loadNamesDefault
-
loadClassDefault
-
certificatePropFile
-
loadNames
private static void loadNames() -
loadClasses
private static void loadClasses() -
addClass
Add an extension to the OIDMap. Assumes existence of static OID and NAME fields with unique values. -
addAttribute
public static void addAttribute(String className, String oid, String name) throws CertificateException Add a name to lookup table.- Parameters:
className
- the name of the fully qualified class implementing the asn object.oid
- the string representation of the object identifier for the class.name
- the name of the attribute.- Throws:
CertificateException
- on errors.
-
getName
Return user friendly name associated with the OID.- Parameters:
oid
- the name of the object identifier to be returned.- Returns:
- the user friendly name or null if no name is registered for this oid.
-
getOID
Return Object identifier for user friendly name.- Parameters:
name
- the user friendly name.- Returns:
- the Object Identifier or null if no oid is registered for this name.
-
getClass
Return the java class object associated with the user friendly name.- Parameters:
name
- the user friendly name.- Throws:
CertificateException
- if class cannot be instantiated.
-
getClass
Return the java class object associated with the object identifier..- Parameters:
oid
- the name of the object identifier to be returned.- Throws:
CertificateException
- if class cannot be instatiated.
-