@peculiar/asn1-tsp
Version:
ASN.1 schema for the Time-Stamp Protocol (TSP) defined in RFC 3161.
51 lines (50 loc) • 1.81 kB
TypeScript
import { Extensions, GeneralName } from "@peculiar/asn1-x509";
import { Accuracy } from "./accuracy";
import { MessageImprint } from "./message_imprint";
export declare enum TSTInfoVersion {
v1 = 1
}
/**
* ```asn1
* TSTInfo ::= SEQUENCE {
* version INTEGER { v1(1) },
* policy TSAPolicyId,
* messageImprint MessageImprint,
* -- MUST have the same value as the similar field in
* -- TimeStampReq
* serialNumber INTEGER,
* -- Time-Stamping users MUST be ready to accommodate integers
* -- up to 160 bits.
* genTime GeneralizedTime,
* accuracy Accuracy OPTIONAL,
* ordering BOOLEAN DEFAULT FALSE,
* nonce INTEGER OPTIONAL,
* -- MUST be present if the similar field was present
* -- in TimeStampReq. In that case it MUST have the same value.
* tsa [0] GeneralName OPTIONAL,
* extensions [1] IMPLICIT Extensions OPTIONAL }
* ```
*/
export declare class TSTInfo {
version: TSTInfoVersion;
policy: string;
/**
* MUST have the same value as the similar field in TimeStampReq
*/
messageImprint: MessageImprint;
/**
* Time-Stamping users MUST be ready to accommodate integers up to 160 bits
*/
serialNumber: ArrayBuffer;
genTime: Date;
accuracy?: Accuracy;
ordering: boolean;
/**
* MUST be present if the similar field was present in TimeStampReq.
* In that case it MUST have the same value
*/
nonce?: ArrayBuffer;
tsa?: GeneralName;
extensions?: Extensions;
constructor(params?: Partial<TSTInfo>);
}