Skip to content

Commit 041564e

Browse files
committed
10.5.19 release
1 parent 751ee07 commit 041564e

18 files changed

+1331
-1087
lines changed

ChangeLog.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11

22
ChangeLog for jsrsasign
33

4+
Time stamp package update
5+
* Changes from 10.5.18 to 10.5.19 (2022-Apr-23)
6+
- src/asn1tsp.js
7+
- TimeStampResp class update to statusinfo member
8+
will be optional. If omitted, it will be "granted" by default.
9+
- API manual update for more detail
10+
411
Time stamp package update
512
* Changes from 10.5.17 to 10.5.18 (2022-Apr-22)
613
- src/asn1tsp.js

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ HIGHLIGHTS
3939
- no dependency to other library
4040
- no dependency to [W3C Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/) nor [OpenSSL](https://www.openssl.org/)
4141
- no dependency on newer ECMAScirpt function. So old browsers also supported.
42-
- very popular crypto library with [0.6M+ npm downloads/month](https://npm-stat.com/charts.html?package=jsrsasign&from=2016-05-01&to=2022-04-02)
42+
- very popular crypto library with [0.6M+ npm downloads/month](https://npm-stat.com/charts.html?package=jsrsasign&from=2016-05-01&to=2022-04-20)
4343

4444
INSTALL
4545
-------

api/files.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ <h2><a href="symbols/src/asn1tsp-1.0.js.html">asn1tsp-1.0.js</a></h2>
643643

644644

645645
<dt class="heading">Version:</dt>
646-
<dd>jsrsasign 10.5.18 asn1tsp 2.0.6 (2022-Apr-22)</dd>
646+
<dd>jsrsasign 10.5.19 asn1tsp 2.0.7 (2022-Apr-23)</dd>
647647

648648

649649

api/symbols/KJUR.asn1.tsp.TSPParser.html

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,15 +1145,14 @@ <h1 class="classTitle">
11451145

11461146

11471147

1148-
<pre class="code">var json = KJUR.asn1.tsp.TSPUtil.parseTimeStampReq("302602...");
1149-
// resulted DUMP of above 'json':
1150-
{
1151-
messageImprint: {
1148+
<pre class="code">var parser = new KJUR.asn1.tsp.TSPParser();
1149+
parser.getTimeStampReq("302602...") &rarr;
1150+
{ messageImprint: {
11521151
alg: 'sha256', // MessageImprint hashAlg
11531152
hash: 'a1a2a3a4...'}, // MessageImprint hashValue
1154-
policy: '1.2.3.4.5', // tsaPolicy (OPTION)
1155-
nonce: '9abcf318...', // nonce (OPTION)
1156-
certreq: true } // certReq (OPTION)</pre>
1153+
policy: '1.2.3.4.5', // tsaPolicy (OPTION)
1154+
nonce: '9abcf318...', // nonce (OPTION)
1155+
certreq: true } // certReq (OPTION)</pre>
11571156

11581157

11591158

@@ -1171,6 +1170,12 @@ <h1 class="classTitle">
11711170

11721171

11731172

1173+
<dl class="detailList">
1174+
<dt class="heading">Since:</dt>
1175+
<dd>jsrsasign 10.5.18 asn1tsp 2.0.6</dd>
1176+
</dl>
1177+
</dl>
1178+
11741179

11751180

11761181
<dl class="detailList">
@@ -1185,6 +1190,8 @@ <h1 class="classTitle">
11851190
<dl class="detailList">
11861191
<dt class="heading">See:</dt>
11871192

1193+
<dd><a href="../symbols/KJUR.asn1.tsp.TimeStampReq.html">KJUR.asn1.tsp.TimeStampReq</a></dd>
1194+
11881195
<dd><a href="../symbols/KJUR.asn1.tsp.TSPUtil.html#.parseTimeStampReq">KJUR.asn1.tsp.TSPUtil.parseTimeStampReq</a></dd>
11891196

11901197
</dl>

api/symbols/KJUR.asn1.tsp.TimeStampResp.html

Lines changed: 79 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,11 @@ <h1 class="classTitle">
558558
<div class="fixedFont">
559559
<b><a href="../symbols/KJUR.asn1.tsp.TimeStampResp.html#constructor">KJUR.asn1.tsp.TimeStampResp</a></b>(params)
560560
</div>
561-
<div class="description">class for TSP TimeStampResp ASN.1 object
562-
<pre>
563-
TimeStampResp ::= SEQUENCE {
564-
status PKIStatusInfo,
565-
timeStampToken TimeStampToken OPTIONAL }
566-
</pre></div>
561+
<div class="description">class for TSP TimeStampResp ASN.1 object<br/>
562+
This is an ASN.1 encoder for TimeStampResp
563+
ASN.1 structure defined in
564+
<a href="https://tools.ietf.org/html/rfc3161#section-2.4.2">
565+
RFC 3161 TSP section 2.4.2</a>.</div>
567566
</td>
568567
</tr>
569568
</tbody>
@@ -608,17 +607,81 @@ <h1 class="classTitle">
608607
</div>
609608

610609
<div class="description">
611-
class for TSP TimeStampResp ASN.1 object
610+
class for TSP TimeStampResp ASN.1 object<br/>
611+
This is an ASN.1 encoder for TimeStampResp
612+
ASN.1 structure defined in
613+
<a href="https://tools.ietf.org/html/rfc3161#section-2.4.2">
614+
RFC 3161 TSP section 2.4.2</a>.
615+
612616
<pre>
613617
TimeStampResp ::= SEQUENCE {
614618
status PKIStatusInfo,
615619
timeStampToken TimeStampToken OPTIONAL }
620+
621+
TimeStampToken ::= ContentInfo
622+
623+
TSTInfo ::= SEQUENCE {
624+
version INTEGER { v1(1) },
625+
policy TSAPolicyId,
626+
messageImprint MessageImprint,
627+
serialNumber INTEGER,
628+
genTime GeneralizedTime,
629+
accuracy Accuracy OPTIONAL,
630+
ordering BOOLEAN DEFAULT FALSE,
631+
nonce INTEGER OPTIONAL,
632+
tsa [0] GeneralName OPTIONAL,
633+
extensions [1] IMPLICIT Extensions OPTIONAL }
616634
</pre>
635+
636+
The constructor argument "params" can be used all of
637+
<a href="../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 <a href="../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: <a href="../symbols/KJUR.asn1.tsp.TimeStampToken.html">KJUR.asn1.tsp.TimeStampToken</a> object instead of TimeStampToken members (OPTIONAL)</li>
644+
</ul>
617645

618646
</div>
619647

620648

621649

650+
<pre class="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() &rarr; "3082..."</pre>
682+
683+
684+
622685

623686

624687
<dl class="detailList">
@@ -643,6 +706,15 @@ <h1 class="classTitle">
643706

644707

645708

709+
<dl class="detailList">
710+
<dt class="heading">See:</dt>
711+
712+
<dd><a href="../symbols/KJUR.asn1.tsp.TimeStampToken.html">KJUR.asn1.tsp.TimeStampToken</a></dd>
713+
714+
<dd><a href="../symbols/KJUR.asn1.tsp.PKIStatusInfo.html">KJUR.asn1.tsp.PKIStatusInfo</a></dd>
715+
716+
</dl>
717+
646718

647719
</div>
648720

0 commit comments

Comments
 (0)