Skip to content

Commit

Permalink
10.5.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Dec 1, 2021
1 parent ee8a6c1 commit 289ce91
Show file tree
Hide file tree
Showing 25 changed files with 954 additions and 559 deletions.
22 changes: 13 additions & 9 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@

ChangeLog for jsrsasign

fix EC P-521 concat signature value and add support for P-521 JWS JWK
* Changes from 10.5.0 to next release
- src/ecdsa-modified.js
- missing variable definition fix (#527)
add KEYUTIL.getJWK, fix EC P-521 concat signature value and add support for P-521 JWS JWK
* Changes from 10.5.0 to 10.5.1 (2021-Dec-01)
- fix ECC P-521 curve issues (#528)
- src/ecdsa-modified.js
- asn1SigToConcatSig fix P521 issue
Expand All @@ -29,12 +27,18 @@ fix EC P-521 concat signature value and add support for P-521 JWS JWK
- test/qunit-do-x509-key.html
- add P-521 certificate test
- JWK from X509 certificate (#529)
- src/x509.js (followings will be move to KEYUTIL)
- getPublicKeyJWK
- readCertJWK
- test/qunit-do-x509-jwk.html (NEW)
- add getPublicKeyJWK, readCertJWK test cases
- this PR was merged but
- X509.getPublicKeyJWK was moved to KEYUTIL.getJWK
- some tests in qunit-do-x509-jwk was moved to
qunit-do-keyutil-jwk
- readCertJWK was removed
- src/keyutil
- KEYUTIL.getJWK added and x5c/x5t/x5t#S256/kid member support
- KEYUTIL.getJWKFromKey now deprecated
- src/ecdsa-modified.js
- missing variable definition fix (#527)
- test/qunit-do-x509.html test error fix
- Great appreciate for @cplussharp 's contribution.

Add EC support for secp521r1 secp224r1 secp192r1
* Changes from 10.4.1 to 10.5.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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=2021-11-20)
- very popular crypto library with [0.6M+ npm downloads/month](https://npm-stat.com/charts.html?package=jsrsasign&from=2016-05-01&to=2021-11-29)

INSTALL
-------
Expand Down
4 changes: 2 additions & 2 deletions api/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ <h2><a href="symbols/src/ecdsa-modified-1.0.js.html">ecdsa-modified-1.0.js</a></


<dt class="heading">Version:</dt>
<dd>jsrsasign 10.5.0 ecdsa-modified 1.2.0 (2021-Nov-21)</dd>
<dd>jsrsasign 10.5.1 ecdsa-modified 1.2.1 (2021-Dec-01)</dd>



Expand Down Expand Up @@ -808,7 +808,7 @@ <h2><a href="symbols/src/keyutil-1.0.js.html">keyutil-1.0.js</a></h2>


<dt class="heading">Version:</dt>
<dd>jsrsasign 10.2.1 keyutil 1.2.4 (2021-May-22)</dd>
<dd>jsrsasign 10.5.1 keyutil 1.2.5 (2021-Dec-01)</dd>



Expand Down
146 changes: 144 additions & 2 deletions api/symbols/KEYUTIL.html
Original file line number Diff line number Diff line change
Expand Up @@ -622,12 +622,28 @@ <h1 class="classTitle">
</td>
</tr>

<tr>
<td class="attributes">&lt;static&gt; &nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">KEYUTIL.<b><a href="../symbols/KEYUTIL.html#.getJWK">getJWK</a></b>(keyinfo, nokid, nox5c, nox5t, nox5t2)
</div>
<div class="description">convert from certificate, public/private key object to RFC 7517 JSON Web Key(JWK)
This static method provides RFC 7517 JSON Web Key(JWK) JSON
object from following argument types:
<ul>
<li>
<b>JWK private key</b>
<ul>
<li>RSAKey or KJUR.crypto.</div>
</td>
</tr>

<tr>
<td class="attributes">&lt;static&gt; &nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">KEYUTIL.<b><a href="../symbols/KEYUTIL.html#.getJWKFromKey">getJWKFromKey</a></b>()
</div>
<div class="description">convert from RSAKey/KJUR.crypto.ECDSA public/private key object to RFC 7517 JSON Web Key(JWK)
<div class="description">convert from RSAKey/KJUR.crypto.ECDSA public/private key object to RFC 7517 JSON Web Key(JWK) (DEPRECATED)
This static method convert from RSAKey/KJUR.crypto.ECDSA public/private key object
to RFC 7517 JSON Web Key(JWK)</div>
</td>
Expand Down Expand Up @@ -1074,6 +1090,125 @@ <h1 class="classTitle">



<hr />

<a name=".getJWK"> </a>
<div class="fixedFont">&lt;static&gt;

<span class="light">{Object}</span>
<span class="light">KEYUTIL.</span><b>getJWK</b>(keyinfo, nokid, nox5c, nox5t, nox5t2)

</div>
<div class="description">
convert from certificate, public/private key object to RFC 7517 JSON Web Key(JWK)
This static method provides RFC 7517 JSON Web Key(JWK) JSON
object from following argument types:
<ul>
<li>
<b>JWK private key</b>
<ul>
<li>RSAKey or KJUR.crypto.{ECDSA,DSA} private key object</li>
<li>PKCS#5 or PKCS#8 plain PEM private key</li>
</ul>
</li>
<li>
<b>JWK public key</b>
<ul>
<li>RSAKey or KJUR.crypto.{ECDSA,DSA} public key object</li>
<li>PKCS#5 or PKCS#8 PEM public key</li>
<li>X509 certificate object</li>
<li>PEM certificate</li>
</ul>
</li>
</ul>


</div>



<pre class="code">kp1 = KEYUTIL.generateKeypair("EC", "P-256");
jwkPrv1 = KEYUTIL.getJWK(kp1.prvKeyObj);
jwkPub1 = KEYUTIL.getJWK(kp1.pubKeyObj);

kp2 = KEYUTIL.generateKeypair("RSA", 2048);
jwkPrv2 = KEYUTIL.getJWK(kp2.prvKeyObj);
jwkPub2 = KEYUTIL.getJWK(kp2.pubKeyObj);

KEYUTIL.getJWK("-----BEGIN CERTIFICATE...") &rarr
{
kty: "EC", crv: "P-521", x: "...", y: "...",
x5c: ["MI..."],
x5t: "...",
"x5t#S256": "...",
kid: "..."
}

x509obj = new X509("-----BEGIN CERTIFICATE...");
KEYUTIL.getJWK(x509obj) &rarr;
{
kty: "EC", crv: "P-521", x: "...", y: "...",
...
}</pre>




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

<dt>
<span class="light fixedFont">{Object or string}</span> <b>keyinfo</b>

</dt>
<dd>public/private key object, PEM key or PEM certificate</dd>

<dt>
<span class="light fixedFont">{boolean}</span> <b>nokid</b>

</dt>
<dd>set true if you don't need kid (OPTION, DEFAULT=undefined)</dd>

<dt>
<span class="light fixedFont">{boolean}</span> <b>nox5c</b>

</dt>
<dd>set true if you don't need x5c of certificate (OPTION, DEFAULT=undefined)</dd>

<dt>
<span class="light fixedFont">{boolean}</span> <b>nox5t</b>

</dt>
<dd>set true if you don't need x5t of certificate (OPTION, DEFAULT=undefined)</dd>

<dt>
<span class="light fixedFont">{boolean}</span> <b>nox5t2</b>

</dt>
<dd>set true if you don't need x5c#S256 of certificate (OPTION, DEFAULT=undefined)</dd>

</dl>



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>keyutil 1.2.5 jsrsasign 10.5.1</dd>
</dl>
</dl>



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

<dd><span class="light fixedFont">{Object}</span> JWK object</dd>

</dl>




<hr />

<a name=".getJWKFromKey"> </a>
Expand All @@ -1084,7 +1219,7 @@ <h1 class="classTitle">

</div>
<div class="description">
convert from RSAKey/KJUR.crypto.ECDSA public/private key object to RFC 7517 JSON Web Key(JWK)
convert from RSAKey/KJUR.crypto.ECDSA public/private key object to RFC 7517 JSON Web Key(JWK) (DEPRECATED)
This static method convert from RSAKey/KJUR.crypto.ECDSA public/private key object
to RFC 7517 JSON Web Key(JWK)

Expand Down Expand Up @@ -1119,6 +1254,13 @@ <h1 class="classTitle">
</dl>


<dl class="detailList">
<dt class="heading">Deprecated:</dt>
<dt>
since jsrsasign 10.5.1 keyutil 1.2.5 please use getJWK method
</dt>
</dl>


<dl class="detailList">
<dt class="heading">Since:</dt>
Expand Down
20 changes: 20 additions & 0 deletions api/symbols/KJUR.crypto.ECDSA.html
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,16 @@ <h1 class="classTitle">
</dl>


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

<dt>
<b></b>
</dt>
<dd>Error when signature length is unsupported</dd>

</dl>


<dl class="detailList">
<dt class="heading">Returns:</dt>
Expand Down Expand Up @@ -937,6 +947,16 @@ <h1 class="classTitle">
</dl>


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

<dt>
<b></b>
</dt>
<dd>Error when signature length is unsupported</dd>

</dl>


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

0 comments on commit 289ce91

Please sign in to comment.