Skip to content

Commit

Permalink
10.1.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Nov 20, 2020
1 parent b41f82d commit 737823a
Show file tree
Hide file tree
Showing 16 changed files with 912 additions and 374 deletions.
13 changes: 13 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@

ChangeLog for jsrsasign

add SigningCertificateV2 for CMSParser and issue fix
* Changes from 10.1.1 to 10.1.2 release (2020-11-21)
- src/asn1cms.js
- CMSParser
- getAttribute updated to support
SigningCertificateV2
- add setSigningCertificateV2 method
- add getESSCertIDv2 method
- change sortflag of result parameter to true in
CMSParser.getCertificateSet
- test/qunit-do-asn1cms.html
- updated to follow above

CMSSignedData and TimeStamp parser bugfix
* Changes from 10.1.0 to 10.1.1 release (2020-11-20)
- src/asn1tsp.js
Expand Down
2 changes: 1 addition & 1 deletion api/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ <h2><a href="symbols/src/asn1cms-1.0.js.html">asn1cms-1.0.js</a></h2>


<dt class="heading">Version:</dt>
<dd>jsrsasign 10.1.1 asn1cms 2.0.2 (2020-Nov-20)</dd>
<dd>jsrsasign 10.1.2 asn1cms 2.0.3 (2020-Nov-21)</dd>



Expand Down
195 changes: 191 additions & 4 deletions api/symbols/KJUR.asn1.cms.CMSParser.html
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,18 @@ <h1 class="classTitle">
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/KJUR.asn1.cms.CMSParser.html#getESSCertIDv2">getESSCertIDv2</a></b>(h)
</div>
<div class="description">parse ASN.1 ESSCertIDv2<br/>
This method parses ASN.1 ESSCertIDv2 defined in
<a href="https://tools.ietf.org/html/rfc5035#section-4">
RFC 5035 section 4</a>.</div>
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
Expand Down Expand Up @@ -781,6 +793,18 @@ <h1 class="classTitle">
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/KJUR.asn1.cms.CMSParser.html#setSigningCertificateV2">setSigningCertificateV2</a></b>(pAttr)
</div>
<div class="description">set SigningCertificateV2 attribute<br/>
This sets an attribute as SigningCertificateV2 defined in
<a href="https://tools.ietf.org/html/rfc5035#section-3">
RFC 5035 section 3</a>.</div>
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
Expand Down Expand Up @@ -884,10 +908,11 @@ <h1 class="classTitle">
Following attribute type are supported in the
latest version:
<ul>
<li>contentType</li>
<li>messageDigest</li>
<li>signingTime</li>
<li>signingCertificate</li>
<li>contentType - KJUR.asn1.cms.CMSParser.setContentType</li>
<li>messageDigest - KJUR.asn1.cms.CMSParser.setMessageDigest</li>
<li>signingTime - KJUR.asn1.cms.CMSParser.setSigningTime</li>
<li>signingCertificate - KJUR.asn1.cms.CMSParser.setSigningCertificate</li>
<li>signingCertificateV2 - KJUR.asn1.cms.CMSParser.setSigningCertificateV2</li>
</ul>


Expand Down Expand Up @@ -1298,6 +1323,89 @@ <h1 class="classTitle">
</dl>


<hr />

<a name="getESSCertIDv2"> </a>
<div class="fixedFont">

<span class="light">{Array}</span>
<b>getESSCertIDv2</b>(h)

</div>
<div class="description">
parse ASN.1 ESSCertIDv2<br/>
This method parses ASN.1 ESSCertIDv2 defined in
<a href="https://tools.ietf.org/html/rfc5035#section-4">
RFC 5035 section 4</a>.
<pre>
ESSCertIDv2 ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier
DEFAULT {algorithm id-sha256},
certHash Hash,
issuerSerial IssuerSerial OPTIONAL }
Hash ::= OCTET STRING
IssuerSerial ::= SEQUENCE {
issuer GeneralNames,
serialNumber CertificateSerialNumber }
</pre>


</div>



<pre class="code">parser = new KJUR.asn1.cms.CMSParser();
parser.getESSCertID("30...") &rarr;
{
hash: "3f2d...",
alg: "sha512",
issuer: {str: "/C=JP/O=T1"},
serial: {hex: "12ab..."}
}</pre>




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

<dt>
<span class="light fixedFont">{String}</span> <b>h</b>

</dt>
<dd>hexadecimal string of ASN.1 ESSCertIDv2</dd>

</dl>



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>jsrsasign 10.1.2 asn1cms 2.0.3</dd>
</dl>
</dl>



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

<dd><span class="light fixedFont">{Array}</span> array of JSON object of ESSCertIDv2 parameter</dd>

</dl>



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

<dd><a href="../symbols/KJUR.asn1.cms.ESSCertIDv2.html">KJUR.asn1.cms.ESSCertIDv2</a></dd>

<dd>KJUR.asn1.cms.CMSParser.getESSCertID</dd>

</dl>


<hr />

<a name="getHashAlgArray"> </a>
Expand Down Expand Up @@ -1975,6 +2083,85 @@ <h1 class="classTitle">
</dl>


<hr />

<a name="setSigningCertificateV2"> </a>
<div class="fixedFont">


<b>setSigningCertificateV2</b>(pAttr)

</div>
<div class="description">
set SigningCertificateV2 attribute<br/>
This sets an attribute as SigningCertificateV2 defined in
<a href="https://tools.ietf.org/html/rfc5035#section-3">
RFC 5035 section 3</a>.


</div>



<pre class="code">parser = new KJUR.asn1.cms.CMSParser();
pAttr = {
attr: "signingCertificateV2"
valhex: '...'
};
parser.setSigningCertificateV2(pAttr);
pAttr &rarr; {
attr: "signingCertificateV2",
array: [{
hash: "123456...",
alg: "sha256",
issuer: {
array: [[{type:"C",value:"JP",ds:"prn"},...]],
str: "/C=JP/O=T1"
},
serial: {hex: "123456..."}
}]
}</pre>




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

<dt>
<span class="light fixedFont">{Array}</span> <b>pAttr</b>

</dt>
<dd>JSON object of attribute parameter</dd>

</dl>



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>jsrsasign 10.1.2 asn1cms 2.0.3</dd>
</dl>
</dl>





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

<dd><a href="../symbols/KJUR.asn1.cms.CMSParser.html#getAttribute">KJUR.asn1.cms.CMSParser#getAttribute</a></dd>

<dd><a href="../symbols/KJUR.asn1.cms.CMSParser.html#getESSCertIDv2">KJUR.asn1.cms.CMSParser#getESSCertIDv2</a></dd>

<dd><a href="../symbols/KJUR.asn1.cms.SigningCertificateV2.html">KJUR.asn1.cms.SigningCertificateV2</a></dd>

<dd><a href="../symbols/KJUR.asn1.cms.ESSCertIDv2.html">KJUR.asn1.cms.ESSCertIDv2</a></dd>

</dl>


<hr />

<a name="setSigningTime"> </a>
Expand Down
Loading

0 comments on commit 737823a

Please sign in to comment.