You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The constructor argument "params" can be used all of
637
+
<ahref="../symbols/KJUR.asn1.tsp.TimeStampToken.html">KJUR.asn1.tsp.TimeStampToken</a> object further more
638
+
following members can be specified:
639
+
<ul>
640
+
<li>statusinfo: any <ahref="../symbols/KJUR.asn1.tsp.PKIStatusInfo.html">KJUR.asn1.tsp.PKIStatusInfo</a> parameter.
641
+
When parameters for TimeStampToken is specified and statusinfo member is omitted,
642
+
status will be "granted" by default. (OPTIONAL)</li>
643
+
<li>tst: <ahref="../symbols/KJUR.asn1.tsp.TimeStampToken.html">KJUR.asn1.tsp.TimeStampToken</a> object instead of TimeStampToken members (OPTIONAL)</li>
644
+
</ul>
617
645
618
646
</div>
619
647
620
648
621
649
650
+
<preclass="code">// by TimeStampToken parameters (statusinfo will be "granted" by default)
651
+
new KJUR.asn1.tsp.TimeStampResp({
652
+
version: 1,
653
+
hashalgs: ["sha256"],
654
+
econtent: {
655
+
type: "tstinfo",
656
+
content: {
657
+
policy: "1.2.3.4.5",
658
+
messageImprint: {alg:"sha256", hash:"12ab..."},
659
+
serial: {"int": 3},
660
+
genTime: {millis: true}, // current time with millis
661
+
accuracy: { millis: 500 }
662
+
}
663
+
}
664
+
certs: [...],
665
+
sinfos: [{
666
+
version: 1,
667
+
id: {type:"isssn", cert: ...},
668
+
hashalg: "sha256",
669
+
sattrs: {array: [{...}]},
670
+
sigalg: "SHA256withRSA",
671
+
signkey: ...
672
+
}]
673
+
})
674
+
// by TimeStampToken object
675
+
new KJUR.asn1.tsp.TimeStampResp({
676
+
tst: new KJUR.asn1.tsp.TimeStapToken(...)
677
+
})
678
+
// error case
679
+
new KJUR.asn1.tsp.TimeStampResp({statusinfo: "rejection"})
680
+
// finally, encode to hexadecimal string
681
+
new KJUR.asn1.tsp.TimeStampResp(...).tohex() → "3082..."</pre>
0 commit comments