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

EXAMPLE

Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified
Method Summary
Method Attributes Method Name and Description
<static>  
KJUR.asn1.x509.TBSCertificate.appendExtension(extObj)
append X.509v3 extension to this object
<static>  
KJUR.asn1.x509.TBSCertificate.appendExtensionByName(name, extParams)
append X.509v3 extension to this object by name and parameters
<static>  
KJUR.asn1.x509.TBSCertificate.setIssuerByParam(x500NameParam)
set issuer name field by parameter
<static>  
KJUR.asn1.x509.TBSCertificate.setNotAfterByParam(timeParam)
set notAfter field by parameter
<static>  
KJUR.asn1.x509.TBSCertificate.setNotBeforeByParam(timeParam)
set notBefore field by parameter
<static>  
KJUR.asn1.x509.TBSCertificate.setSerialNumberByParam(intParam)
set serial number field by parameter
<static>  
KJUR.asn1.x509.TBSCertificate.setSignatureAlgByParam(algIdParam)
set signature algorithm field by parameter
<static>  
KJUR.asn1.x509.TBSCertificate.setSubjectByParam(x500NameParam)
set subject name field by parameter
<static>  
KJUR.asn1.x509.TBSCertificate.setSubjectPublicKeyByGetKey(keyParam)
set subject public key info by RSA/ECDSA/DSA key parameter
<static>  
KJUR.asn1.x509.TBSCertificate.setSubjectPublicKeyByParam(subjPKeyParam)
(DEPRECATED) set subject public key info field by RSA key parameter
Class Detail
KJUR.asn1.x509.TBSCertificate(params)
ASN.1 TBSCertificate structure class

EXAMPLE

 var o = new KJUR.asn1.x509.TBSCertificate();
 o.setSerialNumberByParam({'int': 4});
 o.setSignatureAlgByParam({'name': 'SHA1withRSA'});
 o.setIssuerByParam({'str': '/C=US/O=a'});
 o.setNotBeforeByParam({'str': '130504235959Z'});
 o.setNotAfterByParam({'str': '140504235959Z'});
 o.setSubjectByParam({'str': '/C=US/CN=b'});
 o.setSubjectPublicKeyByParam({'rsakey': rsaKey});
 o.appendExtension(new KJUR.asn1.x509.BasicConstraints({'cA':true}));
 o.appendExtension(new KJUR.asn1.x509.KeyUsage({'bin':'11'}));
Parameters:
{Array} params
associative array of parameters (ex. {})
Method Detail
<static> KJUR.asn1.x509.TBSCertificate.appendExtension(extObj)
append X.509v3 extension to this object
tbsc.appendExtension(new KJUR.asn1.x509.BasicConstraints({'cA':true, 'critical': true}));
tbsc.appendExtension(new KJUR.asn1.x509.KeyUsage({'bin':'11'}));
Parameters:
{Extension} extObj
X.509v3 Extension object
See:
KJUR.asn1.x509.Extension

<static> KJUR.asn1.x509.TBSCertificate.appendExtensionByName(name, extParams)
append X.509v3 extension to this object by name and parameters
tbsc.appendExtensionByName('BasicConstraints', {'cA':true, 'critical': true});
tbsc.appendExtensionByName('KeyUsage', {'bin':'11'});
tbsc.appendExtensionByName('CRLDistributionPoints', {uri: 'http://aaa.com/a.crl'});
tbsc.appendExtensionByName('ExtKeyUsage', {array: [{name: 'clientAuth'}]});
tbsc.appendExtensionByName('AuthorityKeyIdentifier', {kid: '1234ab..'});
Parameters:
{name} name
name of X.509v3 Extension object
{Array} extParams
parameters as argument of Extension constructor.
See:
KJUR.asn1.x509.Extension

<static> KJUR.asn1.x509.TBSCertificate.setIssuerByParam(x500NameParam)
set issuer name field by parameter
tbsc.setIssuerParam({'str': '/C=US/CN=b'});
Parameters:
{Array} x500NameParam
X500Name parameter
See:
KJUR.asn1.x509.X500Name

<static> KJUR.asn1.x509.TBSCertificate.setNotAfterByParam(timeParam)
set notAfter field by parameter
tbsc.setNotAfterByParam({'str': '130508235959Z'});
Parameters:
{Array} timeParam
Time parameter
See:
KJUR.asn1.x509.Time

<static> KJUR.asn1.x509.TBSCertificate.setNotBeforeByParam(timeParam)
set notBefore field by parameter
tbsc.setNotBeforeByParam({'str': '130508235959Z'});
Parameters:
{Array} timeParam
Time parameter
See:
KJUR.asn1.x509.Time

<static> KJUR.asn1.x509.TBSCertificate.setSerialNumberByParam(intParam)
set serial number field by parameter
tbsc.setSerialNumberByParam({'int': 3});
Parameters:
{Array} intParam
DERInteger param

<static> KJUR.asn1.x509.TBSCertificate.setSignatureAlgByParam(algIdParam)
set signature algorithm field by parameter
tbsc.setSignatureAlgByParam({'name': 'SHA1withRSA'});
Parameters:
{Array} algIdParam
AlgorithmIdentifier parameter

<static> KJUR.asn1.x509.TBSCertificate.setSubjectByParam(x500NameParam)
set subject name field by parameter
tbsc.setSubjectParam({'str': '/C=US/CN=b'});
Parameters:
{Array} x500NameParam
X500Name parameter
See:
KJUR.asn1.x509.X500Name

<static> KJUR.asn1.x509.TBSCertificate.setSubjectPublicKeyByGetKey(keyParam)
set subject public key info by RSA/ECDSA/DSA key parameter
tbsc.setSubjectPublicKeyByGetKeyParam(certPEMString); // or 
tbsc.setSubjectPublicKeyByGetKeyParam(pkcs8PublicKeyPEMString); // or 
tbsc.setSubjectPublicKeyByGetKeyParam(kjurCryptoECDSAKeyObject); // et.al.
Parameters:
{Object} keyParam
public key parameter which passed to KEYUTIL.getKey argument
Since:
asn1x509 1.0.6
See:
KJUR.asn1.x509.SubjectPublicKeyInfo
KEYUTIL.getKey

<static> KJUR.asn1.x509.TBSCertificate.setSubjectPublicKeyByParam(subjPKeyParam)
(DEPRECATED) set subject public key info field by RSA key parameter
tbsc.setSubjectPublicKeyByParam({'rsakey': pubKey});
Parameters:
{Array} subjPKeyParam
SubjectPublicKeyInfo parameter of RSA
See:
KJUR.asn1.x509.SubjectPublicKeyInfo

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