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 This class provides CertificateRequestInfo ASN.1 structure defined in RFC 2986 4.1.
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified, params
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
KJUR.asn1.csr.CertificationRequestInfo(params)
ASN.1 CertificationRequestInfo structure class This class provides CertificateRequestInfo ASN.1 structure defined in RFC 2986 4.1.
CertificationRequestInfo ::= SEQUENCE {
  version       INTEGER { v1(0) } (v1,...),
  subject       Name,
  subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
  attributes    [0] Attributes {{ CRIAttributes }} }


NOTE1: Argument "params" JSON value format have been changed without backward compatibility since jsrsasign 9.0.0 asn1csr 2.0.0.
NOTE2: From jsrsasign 10.5.27, "attrs" member in the constructor argument object have been supported to support more Attributes type. Currently following Attribute types are supported:
  • challengePassword
  • unstructuredName - member "names" will be array of DirectoryStrings. (ex. [{prnstr: "aaa"},{utf8str: "bbb"}]
  • extensionRequest - any KJUR.asn1.x509.Extensions constructor argument can be specified for "ext" member value.
csri = new KJUR.asn1.csr.CertificationRequestInfo({
  subject: {str: '/C=US/CN=b'},
  sbjpubkey: <>,
  extreq: [
    {extname:"subjectAltName", array:[{dns:"example.com"}]}
  ]});
csri.tohex() → "30..."

// From jsrsasign 10.5.27, "attrs" supported
csri = new KJUR.asn1.csr.CertificationRequestInfo({
  subject: {str: '/C=US/CN=b'},
  sbjpubkey: <>,
  attrs: [
    {attr: "challengePassword", password: "secret"},
    {attr: "unstructuredName", names: [{utf8str:"aaa"},{ia5str:"bbb"}]},
    {attr: "extensionRequest", ext: [
      {extname: "basicConstraints", cA: true},
      {extname: "subjectKeyIdentifier", kid: "1a2b..."}
    ]}
  ]});
csri.tohex() → "30..."
Parameters:
{Array} params
associative array of parameters (ex. {})
Since:
jsrsasign 4.9.0 asn1csr 1.0.0
See:
KJUR.asn1.csr.CertificationRequest
KJUR.asn1.x509.Extensions

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