Class Index | File Index

Classes


Class KJUR.asn1.x509.TBSCertList


Extends KJUR.asn1.ASN1Object.
TBSCertList ASN.1 structure class for CRL
Defined in: asn1x509-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ASN.1 TBSCertList ASN.1 structure class for CRL
This class represents TBSCertList of CRL defined in RFC 5280 5.1.
Field Summary
Field Attributes Field Name and Description
 
JSON object of parameters
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified
Method Summary
Method Attributes Method Name and Description
 
get DERSequence for revokedCertificates
 
setByParam(JSON)
get array of ASN.1 object for extensions
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
KJUR.asn1.x509.TBSCertList(params)
ASN.1 TBSCertList ASN.1 structure class for CRL
This class represents TBSCertList of CRL defined in RFC 5280 5.1.
TBSCertList  ::=  SEQUENCE  {
      version                 Version OPTIONAL,
                                   -- if present, MUST be v2
      signature               AlgorithmIdentifier,
      issuer                  Name,
      thisUpdate              Time,
      nextUpdate              Time OPTIONAL,
      revokedCertificates     SEQUENCE OF SEQUENCE  {
           userCertificate         CertificateSerialNumber,
           revocationDate          Time,
           crlEntryExtensions      Extensions OPTIONAL
                                    -- if present, version MUST be v2
                                }  OPTIONAL,
      crlExtensions           [0]  EXPLICIT Extensions OPTIONAL
}
NOTE: TBSCertList class is updated without backward compatibility from jsrsasign 9.1.0 asn1x509 2.1.0. Most of methods are removed and parameters can be set by JSON object.
Constructor of this class may have following parameters:
  • {Integer}version (OPTION) - version number. Omitted by default.
  • {String}sigalg - signature algorithm name
  • {Array}issuer - issuer parameter of KJUR.asn1.x509.X500Name
  • {String}thisupdate - thisUpdate field value
  • {String}nextupdate (OPTION) - thisUpdate field value
  • {Array}revcert (OPTION) - revokedCertificates field value as array Its element may have following property:
    • {Array}sn - serialNumber of userCertificate field specified by KJUR.asn1.DERInteger
    • {String}date - revocationDate field specified by a string of KJUR.asn1.x509.Time parameter
    • {Array}ext (OPTION) - array of CRL entry extension parameter
var o = new KJUR.asn1.x509.TBSCertList({
 sigalg: "SHA256withRSA",
 issuer: {array: [[{type:'C',value:'JP',ds:'prn'}],
                  [{type:'O',value:'T1',ds:'prn'}]]},
 thisupdate: "200821235959Z",
 nextupdate: "200828235959Z", // OPTION
 revcert: [
  {sn: {hex: "12ab"}, date: "200401235959Z", ext: [{extname: "cRLReason", code:1}]},
  {sn: {hex: "12bc"}, date: "200405235959Z", ext: [{extname: "cRLReason", code:2}]}
 ],
 ext: [
  {extname: "cRLNumber", num: {'int': 8}},
  {extname: "authorityKeyIdentifier", "kid": {hex: "12ab"}}
 ]
});
o.tohex() → "30..."
Parameters:
{Array} params
JSON object of TBSCertList parameters
Since:
1.0.3
Field Detail
{Array} params
JSON object of parameters
Method Detail
{@link KJUR.asn1.DERSequence} getRevCertSequence()
get DERSequence for revokedCertificates
Returns:
{@link KJUR.asn1.DERSequence} of revokedCertificates

setByParam(JSON)
get array of ASN.1 object for extensions
tbsc = new KJUR.asn1.x509.TBSCertificate();
tbsc.setByParam({version:3, serial:{hex:'1234...'},...});
Parameters:
{Array} JSON
object of TBSCertList parameters

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