Skip to main content

Pkcs10CertificateRequest

Representation of PKCS10 Certificate Request

Extends​

Implements​

Constructors​

Constructor​

new Pkcs10CertificateRequest(raw, options?): Pkcs10CertificateRequest

Creates a new instance fromDER encoded buffer

Parameters​

raw​

AsnEncodedType

DER encoded buffer

options?​

any

Optional ASN.1 parse options (e.g. asn1js.fromBER resource limits)

Returns​

Pkcs10CertificateRequest

Overrides​

PemData.constructor

Constructor​

new Pkcs10CertificateRequest(asn, options?): Pkcs10CertificateRequest

Creates a new instance from ASN.1 CertificationRequest

Parameters​

asn​

CertificationRequest

ASN.1 CertificationRequest

options?​

any

Optional ASN.1 parse options (e.g. asn1js.fromBER resource limits)

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[]


parseOptions​

Get Signature​

get protected parseOptions(): any

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

Returns​

any

Inherited from​

X509CrlEntry.parseOptions


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​

X509CrlEntry.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): Attribute | null

Returns attribute of the specified type

Parameters​

type​

string

Attribute identifier

Returns​

Attribute | null

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): Extension | null

Returns extension of the specified type

Parameters​

type​

string

Extension identifier

Returns​

Extension | null

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