Skip to main content

Pkcs10CertificateRequest

Representation of PKCS10 Certificate Request

Extends

Implements

Constructors

new Pkcs10CertificateRequest()

new Pkcs10CertificateRequest(raw): Pkcs10CertificateRequest

Creates a new instance fromDER encoded buffer

Parameters

raw

AsnEncodedType

DER encoded buffer

Returns

Pkcs10CertificateRequest

Overrides

PemData.constructor

new Pkcs10CertificateRequest()

new Pkcs10CertificateRequest(asn): Pkcs10CertificateRequest

Creates a new instance from ASN.1 CertificationRequest

Parameters

asn

CertificationRequest

ASN.1 CertificationRequest

Returns

Pkcs10CertificateRequest

Overrides

PemData.constructor

Properties

asn

protected readonly asn: CertificationRequest

ASN.1 object

Inherited from

PemData.asn


tag

protected readonly tag: string

PEM tag

Overrides

PemData.tag


NAME

static NAME: string = "PKCS#10 Certificate Request"

Overrides

PemData.NAME

Accessors

attributes

Get Signature

get attributes(): Attribute[]

Gets a list fo CSR attributes

Returns

Attribute[]


extensions

Get Signature

get extensions(): Extension[]

Gets a list of CSR extensions

Returns

Extension[]


publicKey

Get Signature

get publicKey(): PublicKey

Gets a public key of CSR

Returns

PublicKey

Implementation of

IPublicKeyContainer.publicKey


rawData

Get Signature

get rawData(): ArrayBuffer

Gets a DER encoded buffer

Returns

ArrayBuffer

Inherited from

PemData.rawData


signature

Get Signature

get signature(): ArrayBuffer

Gets a signature

Returns

ArrayBuffer


signatureAlgorithm

Get Signature

get signatureAlgorithm(): HashedAlgorithm

Gets a signature algorithm

Returns

HashedAlgorithm


subject

Get Signature

get subject(): string

Gets a string subject name

Returns

string


subjectName

Get Signature

get subjectName(): Name

Gets the subject value from the certificate as an Name

Returns

Name

Methods

equal()

equal(data): data is Pkcs10CertificateRequest

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

Parameters

data

any

Any data

Returns

data is Pkcs10CertificateRequest

Inherited from

PemData.equal


getAttribute()

getAttribute(type): null | Attribute

Returns attribute of the specified type

Parameters

type

string

Attribute identifier

Returns

null | Attribute

Attribute or null


getAttributes()

getAttributes(type): Attribute[]

Returns a list of attributes of the specified type

Parameters

type

string

Attribute identifier

Returns

Attribute[]


getExtension()

getExtension(type): null | Extension

Returns extension of the specified type

Parameters

type

string

Extension identifier

Returns

null | Extension

Extension or null


getExtensions()

getExtensions(type): Extension[]

Returns a list of extension of the specified type

Parameters

type

string

Extension identifier

Returns

Extension[]


getTextName()

protected getTextName(): string

Returns

string

Inherited from

PemData.getTextName


onInit()

protected onInit(_asn): void

Occurs on instance initialization

Parameters

_asn

CertificationRequest

Returns

void

Overrides

PemData.onInit


toString()

Call Signature

toString(): string

Returns encoded object in PEM format

Returns

string

Inherited from

PemData.toString

Call Signature

toString(format): string

Returns encoded object in selected format

Parameters
format

AsnExportType

hex, base64, base64url, pem, asn, text

Returns

string

Inherited from

PemData.toString


toTextObject()

toTextObject(): TextObject

Returns the object in textual representation

Returns

TextObject

Overrides

PemData.toTextObject


toTextObjectEmpty()

protected toTextObjectEmpty(value?): TextObject

Parameters

value?

string

Returns

TextObject

Inherited from

PemData.toTextObjectEmpty


verify()

verify(crypto): Promise<boolean>

Validates CSR signature

Parameters

crypto

Crypto = ...

Crypto provider. Default is from CryptoProvider

Returns

Promise<boolean>


isAsnEncoded()

static isAsnEncoded(data): data is AsnEncodedType

Parameters

data

any

Returns

data is AsnEncodedType

Inherited from

PemData.isAsnEncoded


toArrayBuffer()

static toArrayBuffer(raw): ArrayBuffer

Converts encoded raw to ArrayBuffer. Supported formats are HEX, DER, Base64, Base64Url, PEM

Parameters

raw

Encoded data

string | BufferSource

Returns

ArrayBuffer

Inherited from

PemData.toArrayBuffer