Skip to content

Commit

Permalink
10.5.7 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Feb 18, 2022
1 parent a76b3bf commit 0c47b95
Show file tree
Hide file tree
Showing 18 changed files with 221 additions and 150 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

ChangeLog for jsrsasign

X509CRL.findRevCert bugfix for empty revCerts
* Changes from 10.5.6 to 10.5.7 (2022-Feb-19)
- src/x509crl.js
- X509CRL.{findRevCert,findRevCertBySN} method fix for empty revCerts

X509CRL.findRevCert bugfix
* Changes from 10.5.5 to 10.5.6 (2022-Feb-17)
- src/x509crl.js X509CRL class
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.5.5 x509crl 1.0.3 (2021-Feb-17)</dd>
<dd>jsrsasign 10.5.7 x509crl 1.0.4 (2021-Feb-19)</dd>



Expand Down
4 changes: 2 additions & 2 deletions api/symbols/KJUR.asn1.ocsp.OCSPResponse.html
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@ <h1 class="classTitle">
<<ResponseBytes parameters>>
});
// constructor for error
new KJUR.asn1.ocsp.OCSPRequest({resstatus: 1})
new KJUR.asn1.ocsp.OCSPRequest({resstatus: "unauthorized"})</pre>
new KJUR.asn1.ocsp.OCSPResponse({resstatus: 1})
new KJUR.asn1.ocsp.OCSPResponse({resstatus: "unauthorized"})</pre>



Expand Down
4 changes: 2 additions & 2 deletions api/symbols/src/asn1ocsp-1.0.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
<span class='line'>111</span> * &lt;&lt;ResponseBytes parameters>>
<span class='line'>112</span> * });
<span class='line'>113</span> * // constructor for error
<span class='line'>114</span> * new KJUR.asn1.ocsp.OCSPRequest({resstatus: 1})
<span class='line'>115</span> * new KJUR.asn1.ocsp.OCSPRequest({resstatus: "unauthorized"})
<span class='line'>114</span> * new KJUR.asn1.ocsp.OCSPResponse({resstatus: 1})
<span class='line'>115</span> * new KJUR.asn1.ocsp.OCSPResponse({resstatus: "unauthorized"})
<span class='line'>116</span> */</span><span class="WHIT">
<span class='line'>117</span> </span><span class="NAME">KJUR.asn1.ocsp.OCSPResponse</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="NAME">KJUR.asn1.ocsp.OCSPResponse.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
Expand Down
257 changes: 129 additions & 128 deletions api/symbols/src/x509crl.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": "10.5.6",
"version": "10.5.7",
"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/x509crl.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-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": "10.5.6",
"version": "10.5.7",
"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
4 changes: 2 additions & 2 deletions src/asn1ocsp-1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ KJUR.asn1.ocsp.DEFAULT_HASH = "sha1";
* <<ResponseBytes parameters>>
* });
* // constructor for error
* new KJUR.asn1.ocsp.OCSPRequest({resstatus: 1})
* new KJUR.asn1.ocsp.OCSPRequest({resstatus: "unauthorized"})
* new KJUR.asn1.ocsp.OCSPResponse({resstatus: 1})
* new KJUR.asn1.ocsp.OCSPResponse({resstatus: "unauthorized"})
*/
KJUR.asn1.ocsp.OCSPResponse = function(params) {
KJUR.asn1.ocsp.OCSPResponse.superclass.constructor.call(this);
Expand Down
3 changes: 2 additions & 1 deletion src/x509crl.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @fileOverview
* @name x509crl.js
* @author Kenji Urushima [email protected]
* @version jsrsasign 10.5.5 x509crl 1.0.3 (2021-Feb-17)
* @version jsrsasign 10.5.7 x509crl 1.0.4 (2021-Feb-19)
* @since jsrsasign 10.1.0
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
*/
Expand Down Expand Up @@ -380,6 +380,7 @@ var X509CRL = function(params) {
*/
this.findRevCertBySN = function(hSN) {
if (this.parsed == null) this.getParam();
if (this.parsed.revcert == null) return null;
var revcert = this.parsed.revcert;
for (var i = 0; i < revcert.length; i++) {
if (hSN == revcert[i].sn.hex) return revcert[i];
Expand Down
66 changes: 65 additions & 1 deletion test/x509crl.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
<script src="../src/base64x-1.1.js"></script>
<script src="../src/asn1-1.0.js"></script>
<script src="../src/asn1x509-1.0.js"></script>
<script src="../src/base64x-1.1.js"></script>
<script src="../src/keyutil-1.0.js"></script>
<script src="../src/dsa-2.0.js"></script>
<script src="../src/ecdsa-modified-1.0.js"></script>
Expand All @@ -54,6 +53,60 @@

// **** TEST **********

// Let's Encrypt www.letsencrypt.org chain (pemLetsROOT,pemLetsR3,pemLetsROOTCRL)
var pemLetsR3 = (function() {/*
-----BEGIN CERTIFICATE-----
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw
WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
RW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP
R5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2nwWgsbvsCUJCWH+jdx
sxPnHKzhm+/b5DtFUkWWqcFTzjTIUu61ru2P3mBw4qVUq7ZtDpelQDRrK9O8Zut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r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+
HlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv
MldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX
nLRbwHOoq7hHwg==
-----END CERTIFICATE-----
*/}).toString().match(/\/\*([^]*)\*\//)[1];

var pemLetsROOTCRL = (function() {/*
-----BEGIN X509 CRL-----
MIICyTCBsgIBATANBgkqhkiG9w0BAQsFADBPMQswCQYDVQQGEwJVUzEpMCcGA1UE
ChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElT
UkcgUm9vdCBYMRcNMjEwNzE1MDAwMDAwWhcNMjIwNjE0MjM1OTU5WqAvMC0wHwYD
VR0jBBgwFoAUebRZ5nu25eQBc4AIiMgaWPbpm24wCgYDVR0UBAMCAWUwDQYJKoZI
hvcNAQELBQADggIBACU9kbml56oTQS8hdgSBnKkOFfzSwonn1f8rDkF1S6i12pJo
fR6IKmICE/NLStXratE3cFepDINBl2g5f4eQF129l8GnvRXkjTxq7xl9scBe5Ji7
cxLCwhooZoagErPv+Ze9gAB8f5wk4HlG1J6EWixgxdOgk/4ERtzuyHkBSIhiPP3Y
+u326OaSAZL413P5jLzBUT8zgeLXQLnqaSA9cugtsVyDv959/8to0wrFPBckQhzT
huy3o0mee4O2T/hB07XaJj0V07a6GpEdG6VJHt5VQBjAz6lrFXorAFeuThIAUKks
ivHsuPwU2fxGp3TWkUK1fMfE8mwgTzzlLcO0wY3YMfz0mgu4C+36IsjMs5kR82dj
Mx9IdR201DXCEM18kWiTPESAiN5EGXJ6QyiW1z98j96cmNE9XI05XnC0BJGviKnm
v4mPRVdAKg4RXJWGMwdT6XXSukE4uWBb0vArNjjVDiCGC2XHseopEJ7K3QgBOKAv
IDyekT2aSWS4DFeAktP1W2QM4BLXWgCsjeNkCf7QqPDXlfmghNFR8BlUXrMnNFGa
wB9MfnGP/+hgftI3BCWRftHgnBsMrRVsFr8/ImvTHymd801Gsgfu21/dpAYPGEDB
BRAckZg2VhAWXOm7SPGS+LAcI6c02dO+Xi9dG/8ZClRNLnbJgu1N1PAd1hq6
-----END X509 CRL-----
*/}).toString().match(/\/\*([^]*)\*\//)[1];

// DigiCert Global Root CRL
// 0cert_sites/digicertglobalrootca.crl.529 2020.08.20
var pemCRLDigiCert = (function() {/*
Expand Down Expand Up @@ -158,6 +211,17 @@
deepEqual(crl.findRevCertBySN("0000"), null, "0000 > null(not found)");
});

test("findRevCert test LetsEncryt Root", function() {
var crl = new X509CRL(pemLetsROOTCRL);
var pExpect = {};
deepEqual(crl.findRevCert(pemLetsR3), null, "0000 > null(LetsR3 not found)");
});

test("findRevCertBySN test LetsEncrypt Root", function() {
var crl = new X509CRL(pemLetsROOTCRL);
var pExpect = {};
deepEqual(crl.findRevCertBySN("0000"), null, "0000 > null(not found)");
});

test("verifySignature test (digicert global root crl)", function() {
var crl = new X509CRL(pemCRLDigiCert);
Expand Down

0 comments on commit 0c47b95

Please sign in to comment.