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

new GeneralName()

new GeneralName(type, value): GeneralName

Parameters

type: GeneralNameType

value: string

Returns

GeneralName

Overrides

AsnData.constructor

new GeneralName()

new GeneralName(asn): GeneralName

Parameters

asn: GeneralName

Returns

GeneralName

Overrides

AsnData.constructor

new GeneralName()

new GeneralName(raw): GeneralName

Parameters

raw: BufferSource

Returns

GeneralName

Overrides

AsnData<asn1X509.GeneralName>.constructor

Properties

rawData

readonly rawData: ArrayBuffer

Gets a DER encoded buffer

Inherited from

AsnData.rawData


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

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