Class KJUR.asn1.tsp.TimeStampResp
Extends
KJUR.asn1.ASN1Object.
class for TSP TimeStampResp ASN.1 object
Defined in: asn1tsp-1.0.js.
Constructor Attributes | Constructor Name and Description |
---|---|
KJUR.asn1.tsp.TimeStampResp(params)
class for TSP TimeStampResp ASN.1 object
This is an ASN.1 encoder for TimeStampResp ASN.1 structure defined in RFC 3161 TSP section 2.4.2. |
- Fields borrowed from class KJUR.asn1.ASN1Object:
- hL, hT, hTLV, hV, isModified, params
- Methods borrowed from class KJUR.asn1.ASN1Object:
- getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
KJUR.asn1.tsp.TimeStampResp(params)
class for TSP TimeStampResp ASN.1 object
This is an ASN.1 encoder for TimeStampResp ASN.1 structure defined in RFC 3161 TSP section 2.4.2.
This is an ASN.1 encoder for TimeStampResp ASN.1 structure defined in RFC 3161 TSP section 2.4.2.
TimeStampResp ::= SEQUENCE { status PKIStatusInfo, timeStampToken TimeStampToken OPTIONAL } TimeStampToken ::= ContentInfo TSTInfo ::= SEQUENCE { version INTEGER { v1(1) }, policy TSAPolicyId, messageImprint MessageImprint, serialNumber INTEGER, genTime GeneralizedTime, accuracy Accuracy OPTIONAL, ordering BOOLEAN DEFAULT FALSE, nonce INTEGER OPTIONAL, tsa [0] GeneralName OPTIONAL, extensions [1] IMPLICIT Extensions OPTIONAL }The constructor argument "params" can be used all of KJUR.asn1.tsp.TimeStampToken object further more following members can be specified:
- statusinfo: any KJUR.asn1.tsp.PKIStatusInfo parameter. When parameters for TimeStampToken is specified and statusinfo member is omitted, status will be "granted" by default. (OPTIONAL)
- tst: KJUR.asn1.tsp.TimeStampToken object instead of TimeStampToken members (OPTIONAL)
// by TimeStampToken parameters (statusinfo will be "granted" by default) new KJUR.asn1.tsp.TimeStampResp({ version: 1, hashalgs: ["sha256"], econtent: { type: "tstinfo", content: { policy: "1.2.3.4.5", messageImprint: {alg:"sha256", hash:"12ab..."}, serial: {"int": 3}, genTime: {millis: true}, // current time with millis accuracy: { millis: 500 } } } certs: [...], sinfos: [{ version: 1, id: {type:"isssn", cert: ...}, hashalg: "sha256", sattrs: {array: [{...}]}, sigalg: "SHA256withRSA", signkey: ... }] }) // by TimeStampToken object new KJUR.asn1.tsp.TimeStampResp({ tst: new KJUR.asn1.tsp.TimeStapToken(...) }) // error case new KJUR.asn1.tsp.TimeStampResp({statusinfo: "rejection"}}) new KJUR.asn1.tsp.TimeStampResp({ statusinfo: { status: "rejection", statusstr: ["policy shall be 1.2.3.4.5"], failinfo: "unacceptedPolicy" } }) // finally, encode to hexadecimal string new KJUR.asn1.tsp.TimeStampResp(...).tohex() → "3082..."
- Parameters:
- {Array} params
- associative array of parameters
- Since:
- jsrsasign 4.6.0 asn1tsp 1.0.0