Class KJUR.asn1.x509.OID
static object for OID
Defined in: asn1x509-1.0.js.
Constructor Attributes | Constructor Name and Description |
---|---|
static object for OID
This class defines OID name and values.
|
Field Attributes | Field Name and Description |
---|---|
for short attribute type name and oid (ex.
|
|
for oid name and oid (ex.
|
|
for caching name and DERObjectIdentifier object
|
Method Attributes | Method Name and Description |
---|---|
<static> |
KJUR.asn1.x509.OID.atype2obj(atype)
get DERObjectIdentifier by registered attribute type name such like 'C' or 'CN'
|
<static> |
KJUR.asn1.x509.OID.name2obj(name)
get DERObjectIdentifier by registered OID name
|
<static> |
KJUR.asn1.x509.OID.name2oid(OID)
convert OID name to OID value
This static method converts from OID name to OID string. |
<static> |
KJUR.asn1.x509.OID.oid2atype(oid)
convert OID to AttributeType name
This static method converts OID string to its AttributeType name. |
<static> |
KJUR.asn1.x509.OID.oid2name(oid)
convert OID to name
This static method converts OID string to its name. |
Class Detail
KJUR.asn1.x509.OID()
static object for OID
This class defines OID name and values.
AttributeType names registered in OID.atype2oidList are following:
short | long | OID |
---|---|---|
CN | commonName2.5.4.3 | |
L | localityName | 2.5.4.7 |
ST | stateOrProvinceName | 2.5.4.8 |
O | organizationName | 2.5.4.10 |
OU | organizationalUnitName | 2.5.4.11 |
C | countryName | 2.5.4.6 |
STREET | streetAddress2.5.4.6 | |
DC | domainComponent | 0.9.2342.19200300.100.1.25 |
UID | userId | 0.9.2342.19200300.100.1.1 |
SN | surname | 2.5.4.4 |
DN | distinguishedName | 2.5.4.49 |
E | emailAddress | 1.2.840.113549.1.9.1 |
businessCategory | 2.5.4.15 | |
postalCode | 2.5.4.17 | |
jurisdictionOfIncorporationL | 1.3.6.1.4.1.311.60.2.1.1 | |
jurisdictionOfIncorporationSP | 1.3.6.1.4.1.311.60.2.1.2 | |
jurisdictionOfIncorporationC | 1.3.6.1.4.1.311.60.2.1.3 |
Field Detail
{Assoc Array}
atype2oidList
for short attribute type name and oid (ex. 'C' and '2.5.4.6')
{Assoc Array}
name2oidList
for oid name and oid (ex. 'keyUsage' and '2.5.29.15')
{Assoc Array}
objCache
for caching name and DERObjectIdentifier object
Method Detail
<static>
KJUR.asn1.x509.OID.atype2obj(atype)
get DERObjectIdentifier by registered attribute type name such like 'C' or 'CN'
KJUR.asn1.x509.OID.atype2obj('CN') → 2.5.4.3 KJUR.asn1.x509.OID.atype2obj('OU') → 2.5.4.11
- Parameters:
- {String} atype
- short attribute type name such like 'C' or 'CN'
<static>
KJUR.asn1.x509.OID.name2obj(name)
get DERObjectIdentifier by registered OID name
var asn1ObjOID = OID.name2obj('SHA1withRSA');
- Parameters:
- {String} name
- OID
<static>
{String}
KJUR.asn1.x509.OID.name2oid(OID)
convert OID name to OID value
This static method converts from OID name to OID string. If OID is undefined then it returns empty string (i.e. '').
This static method converts from OID name to OID string. If OID is undefined then it returns empty string (i.e. '').
KJUR.asn1.x509.OID.name2oid("authorityInfoAccess") → 1.3.6.1.5.5.7.1.1
- Parameters:
- {String} OID
- name
- Since:
- asn1x509 1.0.11
- Returns:
- {String} dot noted Object Identifer string (ex. 1.2.3.4)
<static>
{String}
KJUR.asn1.x509.OID.oid2atype(oid)
convert OID to AttributeType name
This static method converts OID string to its AttributeType name. If OID is not defined in OID.atype2oidList associative array then it returns OID specified as argument.
This static method converts OID string to its AttributeType name. If OID is not defined in OID.atype2oidList associative array then it returns OID specified as argument.
KJUR.asn1.x509.OID.oid2atype("2.5.4.3") → CN KJUR.asn1.x509.OID.oid2atype("1.3.6.1.4.1.311.60.2.1.3") → jurisdictionOfIncorporationC KJUR.asn1.x509.OID.oid2atype("0.1.2.3.4") → 0.1.2.3.4 // unregistered OID
- Parameters:
- {String} oid
- dot noted Object Identifer string (ex. 1.2.3.4)
- Since:
- jsrsasign 6.2.2 asn1x509 1.0.18
- Returns:
- {String} OID AttributeType name if registered otherwise oid
<static>
{String}
KJUR.asn1.x509.OID.oid2name(oid)
convert OID to name
This static method converts OID string to its name. If OID is undefined then it returns empty string (i.e. '').
This static method converts OID string to its name. If OID is undefined then it returns empty string (i.e. '').
KJUR.asn1.x509.OID.oid2name("1.3.6.1.5.5.7.1.1") → 'authorityInfoAccess'
- Parameters:
- {String} oid
- dot noted Object Identifer string (ex. 1.2.3.4)
- Since:
- asn1x509 1.0.9
- Returns:
- {String} OID name if registered otherwise empty string