Class Index | File Index

Classes


Class KJUR.asn1.x509.TBSCertificate


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

Class Summary
Constructor Attributes Constructor Name and Description
 
ASN.1 TBSCertificate structure class

NOTE: TBSCertificate class is updated without backward compatibility from jsrsasign 9.0.0 asn1x509 2.0.0.
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
 
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.TBSCertificate(params)
ASN.1 TBSCertificate structure class

NOTE: TBSCertificate class is updated without backward compatibility from jsrsasign 9.0.0 asn1x509 2.0.0. Most of methods are removed and parameters can be set by JSON object.
new TBSCertificate({
 version: 3, // this can be omitted, the default is 3.
 serial: {hex: "1234..."}, // DERInteger parameter
 sigalg: "SHA256withRSA",
 issuer: {array:[[{type:'O',value:'Test',ds:'prn'}]]}, // X500Name parameter
 notbefore: "151231235959Z", // string, passed to Time
 notafter: "251231235959Z", // string, passed to Time
 subject: {array:[[{type:'O',value:'Test',ds:'prn'}]]}, // X500Name parameter
 sbjpubkey: "-----BEGIN...", // KEYUTIL.getKey pubkey parameter
 // As for extension parameters, please see extension class
 // All extension parameters need to have "extname" parameter additionaly.
 ext:[{ 
  extname:"keyUsage",critical:true,
  names:["digitalSignature","keyEncipherment"]
 },{
  extname:"cRLDistributionPoints",
  array:[{dpname:{full:[{uri:"http://example.com/a1.crl"}]}}]
 }, ...]
})

var tbsc = new TBSCertificate();
tbsc.setByParam({version:3,serial:{hex:'1234...'},...});
Parameters:
{Array} params
JSON object of TBSCertificate parameters
See:
KJUR.asn1.x509.Certificate
Field Detail
{Array} params
JSON object of parameters
Method Detail
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 TBSCertificate parameters

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