Class Index | File Index

Classes


Class KJUR.asn1.x509.OID

static object for OID
Defined in: asn1x509-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
static object for OID This class defines OID name and values.
Field Summary
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 Summary
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.checkOIDs(oids)
check validity for OID list
This static method validates an associative array as oid list.
<static>  
KJUR.asn1.x509.OID.name2obj(name)
get DERObjectIdentifier by registered OID name This static method returns DERObjectIdentifier object for the specified OID.
<static>  
KJUR.asn1.x509.OID.name2oid(name)
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.
<static>  
KJUR.asn1.x509.OID.registerOIDs(oids)
register OID list
This static method to register an oids to existing list additionally.
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: commonNamecountryNamestreetAddress
shortlongOID
CN2.5.4.3
LlocalityName2.5.4.7
STstateOrProvinceName2.5.4.8
OorganizationName2.5.4.10
OUorganizationalUnitName2.5.4.11
C2.5.4.6
STREET2.5.4.6
DCdomainComponent0.9.2342.19200300.100.1.25
UIDuserId0.9.2342.19200300.100.1.1
SNsurname2.5.4.4
DNdistinguishedName2.5.4.49
EemailAddress1.2.840.113549.1.9.1
businessCategory2.5.4.15
postalCode2.5.4.17
jurisdictionOfIncorporationL1.3.6.1.4.1.311.60.2.1.1
jurisdictionOfIncorporationSP1.3.6.1.4.1.311.60.2.1.2
jurisdictionOfIncorporationC1.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') → DERObjectIdentifier of 2.5.4.3
KJUR.asn1.x509.OID.atype2obj('OU') → DERObjectIdentifier of 2.5.4.11
KJUR.asn1.x509.OID.atype2obj('streetAddress') → DERObjectIdentifier of 2.5.4.9
KJUR.asn1.x509.OID.atype2obj('2.5.4.9') → DERObjectIdentifier of 2.5.4.9
Parameters:
{String} atype
short attribute type name such like 'C', 'CN' or OID
Returns:
KJUR.asn1.DERObjectIdentifier instance

<static> {boolean} KJUR.asn1.x509.OID.checkOIDs(oids)
check validity for OID list
This static method validates an associative array as oid list.
KJUR.asn1.x509.OID.checkOIDs(*non-assoc-array*) → false
KJUR.asn1.x509.OID.checkOIDs({}) → false
KJUR.asn1.x509.OID.checkOIDs({"test1": "apple"}) → false
KJUR.asn1.x509.OID.checkOIDs({
  "test1": "1.2.3",
  "test2": "0.2.3.4.23",
}) → true // valid oids
KJUR.asn1.x509.OID.checkOIDs({
  "test1": "4.5.7.8"
}) → false // invalid oid
Parameters:
{object} oids
associative array of names and oids
Since:
jsrsasign 10.5.2 asn1x509 2.1.11
Returns:
{boolean} return true when valid OID list otherwise false
See:
KJUR.asn1.x509.OID.registOIDs

<static> {Object} KJUR.asn1.x509.OID.name2obj(name)
get DERObjectIdentifier by registered OID name This static method returns DERObjectIdentifier object for the specified OID.
var asn1ObjOID = KJUR.asn1.x509.OID.name2obj('SHA1withRSA');
Parameters:
{String} name
OID
Returns:
{Object} DERObjectIdentifier instance
See:
KJUR.asn1.DERObjectIdentifier

<static> {String} KJUR.asn1.x509.OID.name2oid(name)
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. '').
KJUR.asn1.x509.OID.name2oid("authorityInfoAccess") → "1.3.6.1.5.5.7.1.1"
KJUR.asn1.x509.OID.name2oid("1.2.3.4") → "1.2.3.4"
KJUR.asn1.x509.OID.name2oid("UNKNOWN NAME") → ""
Parameters:
{String} name
OID name or OID (ex. "sha1" or "1.2.3.4")
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.
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. '').
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

<static> KJUR.asn1.x509.OID.registerOIDs(oids)
register OID list
This static method to register an oids to existing list additionally.
KJUR.asn1.x509.OID.checkOIDs({
  "test1": "4.5.7.8"
}) // do nothing for invalid list

KJUR.asn1.x509.OID.registerOIDs({
  "test1": "1.2.3",
  "test2": "0.2.3.4.23",
}) // successfully registered

KJUR.asn1.x509.OID.name2oid("test1") → "1.2.3"
Parameters:
{object} oids
associative array of names and oids
Since:
jsrsasign 10.5.2 asn1x509 2.1.11
See:
KJUR.asn1.x509.OID.checkOIDs

© 2012-2023 Kenji Urushima, All rights reserved
Documentation generated by JsDoc Toolkit 2.4.0