Skip to content
PKIjsPKIjsPKIjsv4.0.1

TSTInfo

Represents the TSTInfo structure described in RFC3161

new TSTInfo(parameters?): TSTInfo

Initializes a new instance of the TSTInfo class

TSTInfoParameters = {}

Initialization parameters

TSTInfo

PkiObject.constructor

optional accuracy?: Accuracy

Represents the time deviation around the UTC time contained in GeneralizedTime

ITSTInfo.accuracy


optional extensions?: Extension[]

Additional information in the future. Extensions is defined in RFC2459

ITSTInfo.extensions


genTime: Date

Time at which the time-stamp token has been created by the TSA

ITSTInfo.genTime


messageImprint: MessageImprint

The messageImprint MUST have the same value as the similar field in TimeStampReq, provided that the size of the hash value matches the expected size of the hash algorithm identified in hashAlgorithm.

ITSTInfo.messageImprint


optional nonce?: Integer

Field MUST be present if it was present in the TimeStampReq. In such a case it MUST equal the value provided in the TimeStampReq structure.

ITSTInfo.nonce


optional ordering?: boolean

If the ordering field is missing, or if the ordering field is present and set to false, then the genTime field only indicates the time at which the time-stamp token has been created by the TSA.In such a case, the ordering of time-stamp tokens issued by the same TSA or different TSAs is only possible when the difference between the genTime of the first time-stamp token and the genTime of the second time-stamp token is greater than the sum of the accuracies of the genTime for each time-stamp token.

If the ordering field is present and set to true, every time-stamp token from the same TSA can always be ordered based on the genTime field, regardless of the genTime accuracy.

ITSTInfo.ordering


policy: string

TSA’s policy under which the response was produced.

If a similar field was present in the TimeStampReq, then it MUST have the same value, otherwise an error (unacceptedPolicy) MUST be returned

ITSTInfo.policy


serialNumber: Integer

Integer assigned by the TSA to each TimeStampToken.

It MUST be unique for each TimeStampToken issued by a given TSA.

ITSTInfo.serialNumber


optional tsa?: GeneralName

tsa field is to give a hint in identifying the name of the TSA. If present, it MUST correspond to one of the subject names included in the certificate that is to be used to verify the token.

ITSTInfo.tsa


version: number

Version of the time-stamp token.

Conforming time-stamping servers MUST be able to provide version 1 time-stamp tokens.

ITSTInfo.version


static CLASS_NAME: string = "TSTInfo"

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(): TSTInfoJson

Converts the class to JSON object

TSTInfoJson

JSON object

PkiObject.toJSON


toSchema(): Sequence

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

Sequence

ASN.1 object

PkiObject.toSchema


toString(encoding?): string

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

string

PkiObject.toString


verify(params, crypto?): Promise<boolean>

Verify current TST Info value

TSTInfoVerifyParams

Input parameters

ICryptoEngine = ...

Crypto engine

Promise<boolean>


static blockName(): string

Returns block name

string

Returns string block name

PkiObject.blockName


static compareWithDefault(memberName, memberValue): boolean

Compare 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

"version"

String name for a class member

number

Default value

PkiObject.defaultValues

static defaultValues(memberName): string

Returns default values for all class members

"policy"

String name for a class member

string

Default value

PkiObject.defaultValues

static defaultValues(memberName): MessageImprint

Returns default values for all class members

"messageImprint"

String name for a class member

MessageImprint

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"serialNumber"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): Date

Returns default values for all class members

"genTime"

String name for a class member

Date

Default value

PkiObject.defaultValues

static defaultValues(memberName): Accuracy

Returns default values for all class members

"accuracy"

String name for a class member

Accuracy

Default value

PkiObject.defaultValues

static defaultValues(memberName): boolean

Returns default values for all class members

"ordering"

String name for a class member

boolean

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"nonce"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): GeneralName

Returns default values for all class members

"tsa"

String name for a class member

GeneralName

Default value

PkiObject.defaultValues

static defaultValues(memberName): Extension[]

Returns default values for all class members

"extensions"

String name for a class member

Extension[]

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?): any

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

SchemaParameters<{ accuracy?: AccuracySchema; extension?: ExtensionSchema; extensions?: string; genTime?: string; messageImprint?: MessageImprintSchema; nonce?: string; ordering?: string; policy?: string; serialNumber?: string; tsa?: GeneralNameSchema; version?: string; }> = {}

Input parameters for the schema

any

ASN.1 schema object

PkiObject.schema