Skip to main content

GeneralName

Represents ASN.1 type of GeneralName.

This class doesn't support no standard string format is defined for otherName, X.400 name, EDI party name, or any other type of names.

Extends​

Constructors​

Constructor​

new GeneralName(type, value): GeneralName

Parameters​

type​

GeneralNameType

value​

string

Returns​

GeneralName

Overrides​

AsnData.constructor

Constructor​

new GeneralName(asn): GeneralName

Parameters​

asn​

GeneralName

Returns​

GeneralName

Overrides​

AsnData.constructor

Constructor​

new GeneralName(raw): GeneralName

Parameters​

raw​

BufferSource

Returns​

GeneralName

Overrides​

AsnData<asn1X509.GeneralName>.constructor

Properties​

asn​

protected readonly asn: GeneralName

ASN.1 object

Inherited from​

AsnData.asn


type​

type: GeneralNameType

Type of the storing value


value​

value: string

Text representation of ASN.1 GeneralName


NAME​

static NAME: string = "ASN"

Inherited from​

AsnData.NAME

Accessors​

parseOptions​

Get Signature​

get protected parseOptions(): any

Gets the ASN.1 parse options the instance was created with

Returns​

any

Inherited from​

AsnData.parseOptions


rawData​

Get Signature​

get rawData(): ArrayBuffer

Gets a DER encoded buffer

Returns​

ArrayBuffer

Inherited from​

AsnData.rawData

Methods​

equal()​

equal(data): data is GeneralName

Returns true if ASN.1 data is equal to another ASN.1 data, otherwise false

Parameters​

data​

any

Any data

Returns​

data is GeneralName

Inherited from​

AsnData.equal


getTextName()​

protected getTextName(): string

Returns​

string

Inherited from​

AsnData.getTextName


onInit()​

protected onInit(asn): void

Occurs on instance initialization

Parameters​

asn​

GeneralName

Returns​

void

Throws​

Throws error if ASN.1 GeneralName contains unsupported value (eg otherName, X400 address, EDI party name)

Overrides​

AsnData.onInit


toJSON()​

toJSON(): JsonGeneralName

Returns​

JsonGeneralName


toString()​

toString(format): string

Returns a string representation of an object.

Parameters​

format​

AsnDataStringFormat = "text"

Returns​

string

Inherited from​

AsnData.toString


toTextObject()​

toTextObject(): TextObject

Returns the object in textual representation

Returns​

TextObject

Overrides​

AsnData.toTextObject


toTextObjectEmpty()​

protected toTextObjectEmpty(value?): TextObject

Parameters​

value?​

string

Returns​

TextObject

Inherited from​

AsnData.toTextObjectEmpty