Skip to content

Commit

Permalink
9.1.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Aug 27, 2020
1 parent 4f72900 commit 9535af7
Show file tree
Hide file tree
Showing 18 changed files with 402 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 private extension support for Cert CRL and CSR
* Changes from 9.1.1 to 9.1.2 (2020-Aug-27)
- undefined extension regarded as private extesion
in extension parser X509.getExtParam.
Thus certificate, CRL and CSR parser will
not raise error when undefined extension
is parsed.
- src/x509.js
- unknown extension is parsed as
private extension.
- test/qunit-do-{x509-param}.html
- add test case to follow above update

new CRL parser and private extension encoder support
* Changes from 9.1.0 to 9.1.1 (2020-Aug-27)
- add new X509CRL class for CRL parser
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gitadd-all-doc:
git add api/*.html api/symbols/*.html api/symbols/src/*.html

gitadd-release:
git add ChangeLog.txt Makefile bower.json jsrsasign-*-min.js min/*.js src/*.js npm/package.json npm/lib/jsrsasign*.js src/*.js test/qunit-do-*.html
git add ChangeLog.txt Makefile bower.json jsrsasign-*-min.js min/*.js src/*.js npm/package.json npm/lib/jsrsasign*.js src/*.js test/qunit-do-*.html README.md npm/README.md

gitadd: gitadd-all-doc gitadd-release
@echo done
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,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=2020-08-20)
- very popular crypto library with [0.6M+ npm downloads/month](https://npm-stat.com/charts.html?package=jsrsasign&from=2016-05-01&to=2020-08-26)

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


<dt class="heading">Version:</dt>
<dd>jsrsasign 9.1.1 x509 2.0.1 (2020-Aug-26)</dd>
<dd>jsrsasign 9.1.2 x509 2.0.2 (2020-Aug-27)</dd>



Expand Down
707 changes: 355 additions & 352 deletions api/symbols/src/x509-1.1.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kjur-jsrsasign",
"version": "9.1.1",
"version": "9.1.2",
"main": "jsrsasign-all-min.js",
"description": "The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES, JWS and JWT in pure JavaScript.",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions jsrsasign-all-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jsrsasign-jwths-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jsrsasign-rsa-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion min/x509-1.1.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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=2020-08-20)
- very popular crypto library with [0.6M+ npm downloads/month](https://npm-stat.com/charts.html?package=jsrsasign&from=2016-05-01&to=2020-08-26)

INSTALL
-------
Expand Down
4 changes: 2 additions & 2 deletions npm/lib/jsrsasign-all-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion npm/lib/jsrsasign-jwths-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion npm/lib/jsrsasign-rsa-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions npm/lib/jsrsasign.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsrsasign",
"version": "9.1.1",
"version": "9.1.2",
"description": "opensource free pure JavaScript cryptographic library supports RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp and CAdES and JSON Web Signature(JWS)/Token(JWT)/Key(JWK).",
"main": "lib/jsrsasign.js",
"scripts": {
Expand Down
9 changes: 6 additions & 3 deletions src/x509-1.1.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* x509-2.0.1.js (c) 2012-2020 Kenji Urushima | kjur.github.io/jsrsasign/license
/* x509-2.0.2.js (c) 2012-2020 Kenji Urushima | kjur.github.io/jsrsasign/license
*/
/*
* x509.js - X509 class to read subject public key from certificate.
Expand All @@ -16,7 +16,7 @@
* @fileOverview
* @name x509-1.1.js
* @author Kenji Urushima [email protected]
* @version jsrsasign 9.1.1 x509 2.0.1 (2020-Aug-26)
* @version jsrsasign 9.1.2 x509 2.0.2 (2020-Aug-27)
* @since jsrsasign 1.x.x
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
*/
Expand Down Expand Up @@ -2258,7 +2258,10 @@ function X509() {
extParam = this.getExtCRLReason(hExtV, critical);
}
if (extParam != undefined) return extParam;
return null;

var privateParam = { extname: oid, extn: hExtV };
if (critical) privateParam.critical = true;
return privateParam;
};

/**
Expand Down
13 changes: 11 additions & 2 deletions test/qunit-do-x509-param.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,19 +309,28 @@

test("X509.getExtParam test", function() {
var x = new X509();

deepEqual(
x.getExtParam("300e0603551d0f0101ff0404030204b0"),
{ extname: "keyUsage",
critical: true,
names: ["digitalSignature","keyEncipherment","dataEncipherment"]
},
"param ku");
"keyUsage");

deepEqual(
x.getExtParam("30290603551d250422302006082b0601050507030206082b06010505070304060a2b0601040182370a0304"),
{ extname: "extKeyUsage",
array: ["clientAuth", "emailProtection", "1.3.6.1.4.1.311.10.3.4"]
},
"param eku");
"extKeyUsage");

deepEqual(
x.getExtParam("300f06092b060105050730010504020500"),
{ extname: "1.3.6.1.5.5.7.48.1.5",
extn: "0500" },
"ocspNoCheck NULL as privateExtension(may fail if getExtOCSPNoCheck defined)");

});

test("X509.getExtParamArray test", function() {
Expand Down

0 comments on commit 9535af7

Please sign in to comment.