Class Index | File Index

Classes


Class KJUR.asn1.tsp.TimeStampToken


Extends KJUR.asn1.cms.SignedData.
class for TSP TimeStampToken ASN.1 object
Defined in: asn1tsp-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
class for TSP TimeStampToken ASN.1 object
This is an ASN.1 encoder for TimeStampToken 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.cms.SignedData:
checkAndFixParam, getContentInfo, getContentInfoEncodedHex
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
KJUR.asn1.tsp.TimeStampToken(params)
class for TSP TimeStampToken ASN.1 object
This is an ASN.1 encoder for TimeStampToken ASN.1 structure defined in RFC 3161 TSP section 2.4.2.
TimeStampToken ::= ContentInfo
  -- contentType is id-signedData ([CMS])
  -- content is SignedData ([CMS])
id-ct-TSTInfo  OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 4}
Constructor argument "params" is similar to KJUR.asn1.cms.SignedData however "econtent" value is different as follows:
new KJUR.asn1.tsp.TimeStampToken({
  version: 1,
  hashalgs: ["sha256"],
  econtent: {
    type: "tstinfo",
    content: {
      policy: '1.2.3.4.5',
      messageImprint: { hashAlg: 'sha1', hashValue: 'a1a2a3a4' },
      serial: {'int': 3},
      genTime: {str: '20131231235959.123Z', millis: true},
      accuracy: { millis: 500 },
      ordering: true,
      nonce: {'int': 3},
    }
  },
  sinfos: [{
    version: 1,
    id: {type:'isssn', cert: sZ4_CERPEM},
    hashalg: "sha256",
    sattrs: {array: [{
      attr: "contentType",
      type: "data"
    },{
      attr: "signingTime",
      str: '131231235959Z'
    },{
      attr: "messageDigest",
      hex: 'ffff'
    }]},
    sigalg: "SHA256withRSA",
    signkey: sZ4_PRVP8PPEM
  }]
})
Parameters:
{Array} params
JSON object for constructor parameters
Since:
jsrsasign 10.0.0 asn1tsp 2.0.0
See:
KJUR.asn1.tsp.TimeStampResp
KJUR.asn1.tsp.TSTInfo

© 2012-2023 Kenji Urushima, All rights reserved
Documentation generated by JsDoc Toolkit 2.4.0