Skip to content
PKIjsPKIjsPKIjsv4.0.1

GeneralName

Represents the GeneralName structure described in RFC5280

new GeneralName(parameters?): GeneralName

Initializes a new instance of the GeneralName class

GeneralNameParameters = {}

Initialization parameters

GeneralName

PkiObject.constructor

type: number

value type - from a tagged value (0 for “otherName”, 1 for “rfc822Name” etc.)

IGeneralName.type


value: any

ASN.1 object having GeneralName value (type depends on TYPE value)

IGeneralName.value


static CLASS_NAME: string = "GeneralName"

Name of the class

PkiObject.CLASS_NAME

get className(): string

string

PkiObject.className

fromSchema(schema): void

Converts parsed ASN.1 object into current class

any

ASN.1 schema

void

PkiObject.fromSchema


toJSON(): GeneralNameJson

Converts the class to JSON object

GeneralNameJson

JSON object

PkiObject.toJSON


toSchema(): Constructed | ObjectIdentifier | Choice | IA5String

Converts current object to ASN.1 object and sets correct values

Constructed | ObjectIdentifier | Choice | IA5String

ASN.1 object

PkiObject.toSchema


toString(encoding?): string

"hex" | "base64" | "base64url" = "hex"

string

PkiObject.toString


static blockName(): string

Returns block name

string

Returns string block name

PkiObject.blockName


static compareWithDefault(memberName, memberValue): boolean

Compares values with default values for all class members

string

String name for a class member

any

Value to compare with default value

boolean


static defaultValues(memberName): number

Returns default values for all class members

"type"

String name for a class member

number

Default value

PkiObject.defaultValues

static defaultValues(memberName): any

Returns default values for all class members

"value"

String name for a class member

any

Default value

PkiObject.defaultValues


static fromBER<T>(this, raw): T

Creates PKI object from the raw data

T extends PkiObject

PkiObjectConstructor<T>

BufferSource

ASN.1 encoded raw data

T

Initialized and filled current class object

PkiObject.fromBER


static schema(parameters?): Choice

Returns value of pre-defined ASN.1 schema for current class

GeneralNameSchema = {}

Input parameters for the schema

Choice

ASN.1 schema object

PkiObject.schema