Skip to content

Commit

Permalink
10.5.19 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Apr 23, 2022
1 parent 751ee07 commit 041564e
Show file tree
Hide file tree
Showing 18 changed files with 1,331 additions and 1,087 deletions.
7 changes: 7 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

ChangeLog for jsrsasign

Time stamp package update
* Changes from 10.5.18 to 10.5.19 (2022-Apr-23)
- src/asn1tsp.js
- TimeStampResp class update to statusinfo member
will be optional. If omitted, it will be "granted" by default.
- API manual update for more detail

Time stamp package update
* Changes from 10.5.17 to 10.5.18 (2022-Apr-22)
- src/asn1tsp.js
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ HIGHLIGHTS
- no dependency to other library
- no dependency to [W3C Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/) nor [OpenSSL](https://www.openssl.org/)
- no dependency on newer ECMAScirpt function. So old browsers also supported.
- 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)
- 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)

INSTALL
-------
Expand Down
2 changes: 1 addition & 1 deletion api/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ <h2><a href="symbols/src/asn1tsp-1.0.js.html">asn1tsp-1.0.js</a></h2>


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



Expand Down
21 changes: 14 additions & 7 deletions api/symbols/KJUR.asn1.tsp.TSPParser.html
Original file line number Diff line number Diff line change
Expand Up @@ -1145,15 +1145,14 @@ <h1 class="classTitle">



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



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



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>jsrsasign 10.5.18 asn1tsp 2.0.6</dd>
</dl>
</dl>



<dl class="detailList">
Expand All @@ -1185,6 +1190,8 @@ <h1 class="classTitle">
<dl class="detailList">
<dt class="heading">See:</dt>

<dd><a href="../symbols/KJUR.asn1.tsp.TimeStampReq.html">KJUR.asn1.tsp.TimeStampReq</a></dd>

<dd><a href="../symbols/KJUR.asn1.tsp.TSPUtil.html#.parseTimeStampReq">KJUR.asn1.tsp.TSPUtil.parseTimeStampReq</a></dd>

</dl>
Expand Down
86 changes: 79 additions & 7 deletions api/symbols/KJUR.asn1.tsp.TimeStampResp.html
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,11 @@ <h1 class="classTitle">
<div class="fixedFont">
<b><a href="../symbols/KJUR.asn1.tsp.TimeStampResp.html#constructor">KJUR.asn1.tsp.TimeStampResp</a></b>(params)
</div>
<div class="description">class for TSP TimeStampResp ASN.1 object
<pre>
TimeStampResp ::= SEQUENCE {
status PKIStatusInfo,
timeStampToken TimeStampToken OPTIONAL }
</pre></div>
<div class="description">class for TSP TimeStampResp ASN.1 object<br/>
This is an ASN.1 encoder for TimeStampResp
ASN.1 structure defined in
<a href="https://tools.ietf.org/html/rfc3161#section-2.4.2">
RFC 3161 TSP section 2.4.2</a>.</div>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -608,17 +607,81 @@ <h1 class="classTitle">
</div>

<div class="description">
class for TSP TimeStampResp ASN.1 object
class for TSP TimeStampResp ASN.1 object<br/>
This is an ASN.1 encoder for TimeStampResp
ASN.1 structure defined in
<a href="https://tools.ietf.org/html/rfc3161#section-2.4.2">
RFC 3161 TSP section 2.4.2</a>.

<pre>
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 }
</pre>

The constructor argument "params" can be used all of
<a href="../symbols/KJUR.asn1.tsp.TimeStampToken.html">KJUR.asn1.tsp.TimeStampToken</a> object further more
following members can be specified:
<ul>
<li>statusinfo: any <a href="../symbols/KJUR.asn1.tsp.PKIStatusInfo.html">KJUR.asn1.tsp.PKIStatusInfo</a> parameter.
When parameters for TimeStampToken is specified and statusinfo member is omitted,
status will be "granted" by default. (OPTIONAL)</li>
<li>tst: <a href="../symbols/KJUR.asn1.tsp.TimeStampToken.html">KJUR.asn1.tsp.TimeStampToken</a> object instead of TimeStampToken members (OPTIONAL)</li>
</ul>

</div>



<pre class="code">// 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"})
// finally, encode to hexadecimal string
new KJUR.asn1.tsp.TimeStampResp(...).tohex() &rarr; "3082..."</pre>





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



<dl class="detailList">
<dt class="heading">See:</dt>

<dd><a href="../symbols/KJUR.asn1.tsp.TimeStampToken.html">KJUR.asn1.tsp.TimeStampToken</a></dd>

<dd><a href="../symbols/KJUR.asn1.tsp.PKIStatusInfo.html">KJUR.asn1.tsp.PKIStatusInfo</a></dd>

</dl>


</div>

Expand Down
Loading

0 comments on commit 041564e

Please sign in to comment.