Skip to content

Commit

Permalink
10.5.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Feb 16, 2022
1 parent 7b263e8 commit 922e526
Show file tree
Hide file tree
Showing 16 changed files with 864 additions and 384 deletions.
8 changes: 8 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

ChangeLog for jsrsasign

CRL parser update
* Changes from 10.5.4 to 10.5.5 (2022-Feb-17)
- src/x509crl.js X509CRL class
- add getIssuerHex method
- add findRevCert method
- add findRevCertBySN method
- test/x509crl.html update

ASN.1 parser update and fix
* Changes from 10.5.3 to 10.5.4 (2022-Feb-15)
- src/asn1.js
Expand Down
2 changes: 1 addition & 1 deletion api/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ <h2><a href="symbols/src/x509crl.js.html">x509crl.js</a></h2>


<dt class="heading">Version:</dt>
<dd>jsrsasign 10.1.0 x509crl 1.0.2 (2020-Nov-18)</dd>
<dd>jsrsasign 10.5.5 x509crl 1.0.3 (2021-Feb-17)</dd>



Expand Down
243 changes: 243 additions & 0 deletions api/symbols/X509CRL.html
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,28 @@ <h1 class="classTitle">
</thead>
<tbody>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/X509CRL.html#findRevCert">findRevCert</a></b>(PEM)
</div>
<div class="description">get revokedCertificate associative array for checking certificate<br/>
This method will find revokedCertificate entry as JSON object
for a specified certificate.</div>
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/X509CRL.html#findRevCertBySN">findRevCertBySN</a></b>(hexadecimal)
</div>
<div class="description">get revokedCertificate associative array for serial number<br/>
This method will find revokedCertificate entry as JSON object
for a specified serial number.</div>
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
Expand All @@ -637,6 +659,15 @@ <h1 class="classTitle">
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/X509CRL.html#getIssuerHex">getIssuerHex</a></b>()
</div>
<div class="description">get hexadecimal string of issuer field TLV of certificate.</div>
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
Expand Down Expand Up @@ -762,6 +793,7 @@ <h1 class="classTitle">
<li>version - <a href="../symbols/X509CRL.html#getVersion">X509CRL#getVersion</a></li>
<li>signatureAlgorithm - <a href="../symbols/X509CRL.html#getSignatureAlgorithmField">X509CRL#getSignatureAlgorithmField</a></li>
<li>issuer - <a href="../symbols/X509CRL.html#getIssuer">X509CRL#getIssuer</a></li>
<li>issuer - <a href="../symbols/X509CRL.html#getIssuerHex">X509CRL#getIssuerHex</a></li>
<li>thisUpdate - <a href="../symbols/X509CRL.html#getThisUpdate">X509CRL#getThisUpdate</a></li>
<li>nextUpdate - <a href="../symbols/X509CRL.html#getNextUpdate">X509CRL#getNextUpdate</a></li>
<li>revokedCertificates - <a href="../symbols/X509CRL.html#getRevCertArray">X509CRL#getRevCertArray</a></li>
Expand All @@ -777,6 +809,12 @@ <h1 class="classTitle">



<pre class="code">// constructor
crl = new X509CRL("-----BEGIN X509 CRL...");
crl = new X509CRL("3082...");</pre>





<dl class="detailList">
Expand Down Expand Up @@ -889,6 +927,159 @@ <h1 class="classTitle">
Method Detail
</div>

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

<span class="light">{object}</span>
<b>findRevCert</b>(PEM)

</div>
<div class="description">
get revokedCertificate associative array for checking certificate<br/>
This method will find revokedCertificate entry as JSON object
for a specified certificate. <br/>
When the serial number is not found in the entry, this returns null.<br/>
Before finding, <a href="../symbols/X509CRL.html#getParam">X509CRL#getParam</a> is called internally
to parse CRL.<br/>
NOTE: This method will just find an entry for a serial number.
You need to check whether CRL is proper one or not
for checking certificate such as signature validation or
name checking.


</div>



<pre class="code">crl = new X509CRL(PEMCRL);

crl.findRevCert(PEMCERT-REVOKED) &rarr;
{sn:"123a", date:"208025235959Z", ext: [{extname:"cRLReason",code:3}]}

crl.findRevCert(PEMCERT-NOTREVOKED) &rarr; null

crl.findRevCert(CERT-HEX) &rarr; null or {sn:...}</pre>




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

<dt>
<span class="light fixedFont">{string}</span> <b>PEM</b>

</dt>
<dd>or hexadecimal string of certificate to be revocation-checked</dd>

</dl>



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>jsrsasign 10.5.5 x509crl 1.0.3</dd>
</dl>
</dl>



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

<dd><span class="light fixedFont">{object}</span> JSON object for revokedCertificate or null</dd>

</dl>



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

<dd><a href="../symbols/X509CRL.html#getParam">X509CRL#getParam</a></dd>

<dd><a href="../symbols/X509CRL.html#findRevCertBySN">X509CRL#findRevCertBySN</a></dd>

</dl>


<hr />

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

<span class="light">{object}</span>
<b>findRevCertBySN</b>(hexadecimal)

</div>
<div class="description">
get revokedCertificate associative array for serial number<br/>
This method will find revokedCertificate entry as JSON object
for a specified serial number. <br/>
When the serial number is not found in the entry, this returns null.<br/>
Before finding, <a href="../symbols/X509CRL.html#getParam">X509CRL#getParam</a> is called internally
to parse CRL.<br/>
NOTE: This method will just find an entry for a serial number.
You need to check whether CRL is proper one or not
for checking certificate such as signature validation or
name checking.


</div>



<pre class="code">crl = new X509CRL(PEMCRL);
crl.findRevCertBySN("123a") &rarr; // revoked
{sn:"123a", date:"208025235959Z", ext: [{extname:"cRLReason",code:3}]}

crl.findRevCertBySN("0000") &rarr; null // not revoked</pre>




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

<dt>
<span class="light fixedFont">{string}</span> <b>hexadecimal</b>

</dt>
<dd>string of checking certificate serial number</dd>

</dl>



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>jsrsasign 10.5.5 x509crl 1.0.3</dd>
</dl>
</dl>



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

<dd><span class="light fixedFont">{object}</span> JSON object for revokedCertificate or null</dd>

</dl>



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

<dd><a href="../symbols/X509CRL.html#getParam">X509CRL#getParam</a></dd>

<dd><a href="../symbols/X509CRL.html#findRevCert">X509CRL#findRevCert</a></dd>

</dl>


<hr />

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

Expand Down Expand Up @@ -939,6 +1130,58 @@ <h1 class="classTitle">
</dl>


<hr />

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

<span class="light">{string}</span>
<b>getIssuerHex</b>()

</div>
<div class="description">
get hexadecimal string of issuer field TLV of certificate.<br/>
This method returns ASN.1 DER hexadecimal string of
issuer field.


</div>



<pre class="code">crl = new X509CRL("-----BEGIN X509 CRL...");
x.getIssuerHex() &rarr; "30..."</pre>






<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>jsrsasign 10.5.5 x509crl 1.0.3</dd>
</dl>
</dl>



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

<dd><span class="light fixedFont">{string}</span> hexadecial string of issuer DN ASN.1</dd>

</dl>



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

<dd><a href="../symbols/X509CRL.html#getIssuer">X509CRL#getIssuer</a></dd>

</dl>


<hr />

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

0 comments on commit 922e526

Please sign in to comment.