Class Index | File Index

Classes


Class KJUR.asn1.csr.CertificationRequestInfo


Extends KJUR.asn1.ASN1Object.
ASN.1 CertificationRequestInfo structure class
Defined in: asn1csr-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ASN.1 CertificationRequestInfo structure class
// -- DEFINITION OF ASN.1 SYNTAX --
// CertificationRequestInfo ::= SEQUENCE {
//   version       INTEGER { v1(0) } (v1,.
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified
Method Summary
Method Attributes Method Name and Description
 
appendExtensionByName(name, extParams)
append X.509v3 extension to this object by name and parameters
 
setSubjectByParam(x500NameParam)
set subject name field by parameter
 
set subject public key info by RSA/ECDSA/DSA key parameter
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex
Class Detail
KJUR.asn1.csr.CertificationRequestInfo(params)
ASN.1 CertificationRequestInfo structure class
// -- DEFINITION OF ASN.1 SYNTAX --
// CertificationRequestInfo ::= SEQUENCE {
//   version       INTEGER { v1(0) } (v1,...),
//   subject       Name,
//   subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
//   attributes    [0] Attributes{{ CRIAttributes }} }

csri = new KJUR.asn1.csr.CertificationRequestInfo();
csri.setSubjectByParam({'str': '/C=US/O=Test/CN=example.com'});
csri.setSubjectPublicKeyByGetKey(pubKeyObj);
Parameters:
{Array} params
associative array of parameters (ex. {})
Since:
jsrsasign 4.9.0 asn1csr 1.0.0
Method Detail
appendExtensionByName(name, extParams)
append X.509v3 extension to this object by name and parameters
var o = new KJUR.asn1.csr.CertificationRequestInfo();
o.appendExtensionByName('BasicConstraints', {'cA':true, 'critical': true});
o.appendExtensionByName('KeyUsage', {'bin':'11'});
o.appendExtensionByName('CRLDistributionPoints', {uri: 'http://aaa.com/a.crl'});
o.appendExtensionByName('ExtKeyUsage', {array: [{name: 'clientAuth'}]});
o.appendExtensionByName('AuthorityKeyIdentifier', {kid: '1234ab..'});
o.appendExtensionByName('AuthorityInfoAccess', {array: [{accessMethod:{oid:...},accessLocation:{uri:...}}]});
Parameters:
{name} name
name of X.509v3 Extension object
{Array} extParams
parameters as argument of Extension constructor.
See:
KJUR.asn1.x509.Extension

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

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

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