Class Index | File Index

Classes


Class KJUR.asn1.x509.GeneralName

GeneralName ASN.1 structure class
Defined in: asn1x509-1.0.js.

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

As for argument 'params' for constructor, you can specify one of following properties:
  • rfc822 - rfc822Name[1] (ex.
Class Detail
KJUR.asn1.x509.GeneralName()
GeneralName ASN.1 structure class

As for argument 'params' for constructor, you can specify one of following properties:
  • rfc822 - rfc822Name[1] (ex. user1@foo.com)
  • dns - dNSName[2] (ex. foo.com)
  • uri - uniformResourceIdentifier[6] (ex. http://foo.com/)
  • dn - directoryName[4] distinguished name string or X500Name class parameters can be specified (ex. "/C=US/O=Test", {hex: '301c...')
  • ldapdn - directoryName[4] (ex. O=Test,C=US)
  • certissuer - directoryName[4] (PEM or hex string of cert)
  • certsubj - directoryName[4] (PEM or hex string of cert)
  • ip - iPAddress[7] (ex. 192.168.1.1, 2001:db3::43, 3faa0101...)
NOTE1: certissuer and certsubj were supported since asn1x509 1.0.10.
NOTE2: dn and ldapdn were supported since jsrsasign 6.2.3 asn1x509 1.0.19.
NOTE3: ip were supported since jsrsasign 8.0.10 asn1x509 1.1.4.
NOTE4: X500Name parameters in dn were supported since jsrsasign 8.0.16.
NOTE5: otherName is supported since jsrsasign 10.5.3.
Here is definition of the ASN.1 syntax:
-- NOTE: under the CHOICE, it will always be explicit.
GeneralName ::= CHOICE {
  otherName                  [0] OtherName,
  rfc822Name                 [1] IA5String,
  dNSName                    [2] IA5String,
  x400Address                [3] ORAddress,
  directoryName              [4] Name,
  ediPartyName               [5] EDIPartyName,
  uniformResourceIdentifier  [6] IA5String,
  iPAddress                  [7] OCTET STRING,
  registeredID               [8] OBJECT IDENTIFIER }

OtherName ::= SEQUENCE {
  type-id    OBJECT IDENTIFIER,
  value      [0] EXPLICIT ANY DEFINED BY type-id }
gn = new KJUR.asn1.x509.GeneralName({dn:     '/C=US/O=Test'});
gn = new KJUR.asn1.x509.GeneralName({dn:     X500NameObject);
gn = new KJUR.asn1.x509.GeneralName({dn:     {str: /C=US/O=Test'});
gn = new KJUR.asn1.x509.GeneralName({dn:     {ldapstr: 'O=Test,C=US'});
gn = new KJUR.asn1.x509.GeneralName({dn:     {hex: '301c...'});
gn = new KJUR.asn1.x509.GeneralName({dn:     {certissuer: PEMCERTSTRING});
gn = new KJUR.asn1.x509.GeneralName({dn:     {certsubject: PEMCERTSTRING});
gn = new KJUR.asn1.x509.GeneralName({ip:     '192.168.1.1'});
gn = new KJUR.asn1.x509.GeneralName({ip:     '2001:db4::4:1'});
gn = new KJUR.asn1.x509.GeneralName({ip:     'c0a80101'});
gn = new KJUR.asn1.x509.GeneralName({rfc822: 'test@aaa.com'});
gn = new KJUR.asn1.x509.GeneralName({dns:    'aaa.com'});
gn = new KJUR.asn1.x509.GeneralName({uri:    'http://aaa.com/'});
gn = new KJUR.asn1.x509.GeneralName({other: {
  oid: "1.2.3.4",
  value: {utf8str: "example"} // any ASN.1 which passed to ASN1Util.newObject
}});

gn = new KJUR.asn1.x509.GeneralName({ldapdn:     'O=Test,C=US'}); // DEPRECATED
gn = new KJUR.asn1.x509.GeneralName({certissuer: certPEM});       // DEPRECATED
gn = new KJUR.asn1.x509.GeneralName({certsubj:   certPEM});       // DEPRECATED
See:
KJUR.asn1.x509.OtherName
KJUR.asn1.x509.X500Name

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