TimeStampReq
Represents the TimeStampReq structure described in RFC3161
Example
Section titled “Example”The following example demonstrates how to create Time-Stamp Request
const nonce = pkijs.getRandomValues(new Uint8Array(10)).buffer;
const tspReq = new pkijs.TimeStampReq({ version: 1, messageImprint: await pkijs.MessageImprint.create("SHA-256", message), reqPolicy: "1.2.3.4.5.6", certReq: true, nonce: new asn1js.Integer({ valueHex: nonce }),});
const tspReqRaw = tspReq.toSchema().toBER();Extends
Section titled “Extends”Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TimeStampReq(
parameters?):TimeStampReq
Initializes a new instance of the TimeStampReq class
Parameters
Section titled “Parameters”parameters?
Section titled “parameters?”Initialization parameters
Returns
Section titled “Returns”TimeStampReq
Overrides
Section titled “Overrides”Properties
Section titled “Properties”certReq?
Section titled “certReq?”
optionalcertReq?:boolean
If the certReq field is present and set to true, the TSA’s public key certificate that is referenced by the ESSCertID identifier inside a SigningCertificate attribute in the response MUST be provided by the TSA in the certificates field from the SignedData structure in that response. That field may also contain other certificates.
If the certReq field is missing or if the certReq field is present and set to false then the certificates field from the SignedData structure MUST not be present in the response.
Implementation of
Section titled “Implementation of”extensions?
Section titled “extensions?”
optionalextensions?:Extension[]
The extensions field is a generic way to add additional information to the request in the future.
Implementation of
Section titled “Implementation of”messageImprint
Section titled “messageImprint”messageImprint:
MessageImprint
Contains the hash of the datum to be time-stamped
Implementation of
Section titled “Implementation of”nonce?
Section titled “nonce?”
optionalnonce?:Integer
The nonce, if included, allows the client to verify the timeliness of the response when no local clock is available. The nonce is a large random number with a high probability that the client generates it only once.
Implementation of
Section titled “Implementation of”reqPolicy?
Section titled “reqPolicy?”
optionalreqPolicy?:string
Indicates the TSA policy under which the TimeStampToken SHOULD be provided.
Implementation of
Section titled “Implementation of”version
Section titled “version”version:
number
Version of the Time-Stamp request. Should be version 1.
Implementation of
Section titled “Implementation of”CLASS_NAME
Section titled “CLASS_NAME”
staticCLASS_NAME:string="TimeStampReq"
Name of the class
Overrides
Section titled “Overrides”Accessors
Section titled “Accessors”className
Section titled “className”Get Signature
Section titled “Get Signature”get className():
string
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”fromSchema()
Section titled “fromSchema()”fromSchema(
schema):void
Converts parsed ASN.1 object into current class
Parameters
Section titled “Parameters”schema
Section titled “schema”any
ASN.1 schema
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”toJSON()
Section titled “toJSON()”toJSON():
TimeStampReqJson
Converts the class to JSON object
Returns
Section titled “Returns”JSON object
Overrides
Section titled “Overrides”toSchema()
Section titled “toSchema()”toSchema():
Sequence
Converts current object to ASN.1 object and sets correct values
Returns
Section titled “Returns”Sequence
ASN.1 object
Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString(
encoding?):string
Parameters
Section titled “Parameters”encoding?
Section titled “encoding?”"hex" | "base64" | "base64url" = "hex"
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”blockName()
Section titled “blockName()”
staticblockName():string
Returns block name
Returns
Section titled “Returns”string
Returns string block name
Inherited from
Section titled “Inherited from”compareWithDefault()
Section titled “compareWithDefault()”
staticcompareWithDefault(memberName,memberValue):boolean
Compare values with default values for all class members
Parameters
Section titled “Parameters”memberName
Section titled “memberName”string
String name for a class member
memberValue
Section titled “memberValue”any
Value to compare with default value
Returns
Section titled “Returns”boolean
defaultValues()
Section titled “defaultValues()”Call Signature
Section titled “Call Signature”
staticdefaultValues(memberName):number
Returns default values for all class members
Parameters
Section titled “Parameters”memberName
Section titled “memberName”"version"
String name for a class member
Returns
Section titled “Returns”number
Default value
Overrides
Section titled “Overrides”Call Signature
Section titled “Call Signature”
staticdefaultValues(memberName):MessageImprint
Returns default values for all class members
Parameters
Section titled “Parameters”memberName
Section titled “memberName”"messageImprint"
String name for a class member
Returns
Section titled “Returns”Default value
Overrides
Section titled “Overrides”PkiObject.defaultValues
Call Signature
Section titled “Call Signature”
staticdefaultValues(memberName):string
Returns default values for all class members
Parameters
Section titled “Parameters”memberName
Section titled “memberName”"reqPolicy"
String name for a class member
Returns
Section titled “Returns”string
Default value
Overrides
Section titled “Overrides”PkiObject.defaultValues
Call Signature
Section titled “Call Signature”
staticdefaultValues(memberName):Integer
Returns default values for all class members
Parameters
Section titled “Parameters”memberName
Section titled “memberName”"nonce"
String name for a class member
Returns
Section titled “Returns”Integer
Default value
Overrides
Section titled “Overrides”PkiObject.defaultValues
Call Signature
Section titled “Call Signature”
staticdefaultValues(memberName):boolean
Returns default values for all class members
Parameters
Section titled “Parameters”memberName
Section titled “memberName”"certReq"
String name for a class member
Returns
Section titled “Returns”boolean
Default value
Overrides
Section titled “Overrides”PkiObject.defaultValues
Call Signature
Section titled “Call Signature”
staticdefaultValues(memberName):Extension[]
Returns default values for all class members
Parameters
Section titled “Parameters”memberName
Section titled “memberName”"extensions"
String name for a class member
Returns
Section titled “Returns”Default value
Overrides
Section titled “Overrides”PkiObject.defaultValues
fromBER()
Section titled “fromBER()”
staticfromBER<T>(this,raw):T
Creates PKI object from the raw data
Type Parameters
Section titled “Type Parameters”T extends PkiObject
Parameters
Section titled “Parameters”PkiObjectConstructor<T>
BufferSource
ASN.1 encoded raw data
Returns
Section titled “Returns”T
Initialized and filled current class object
Inherited from
Section titled “Inherited from”schema()
Section titled “schema()”
staticschema(parameters?):any
Returns value of pre-defined ASN.1 schema for current class
Parameters
Section titled “Parameters”parameters?
Section titled “parameters?”SchemaParameters<{ certReq?: string; extensions?: string; messageImprint?: MessageImprintSchema; nonce?: string; reqPolicy?: string; version?: string; }> = {}
Input parameters for the schema
Returns
Section titled “Returns”any
ASN.1 schema object