-
-
Notifications
You must be signed in to change notification settings - Fork 644
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* asn1-1.0.25.js (c) 2013-2022 Kenji Urushima | kjur.github.io/jsrsasign/license | ||
/* asn1-1.0.26.js (c) 2013-2022 Kenji Urushima | kjur.github.io/jsrsasign/license | ||
*/ | ||
/* | ||
* asn1.js - ASN.1 DER encoder classes | ||
|
@@ -16,7 +16,7 @@ | |
* @fileOverview | ||
* @name asn1-1.0.js | ||
* @author Kenji Urushima [email protected] | ||
* @version jsrsasign 10.5.21 asn1 1.0.25 (2022-May-23) | ||
* @version jsrsasign 10.5.22 asn1 1.0.26 (2022-May-24) | ||
* @since jsrsasign 2.1 | ||
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a> | ||
*/ | ||
|
@@ -974,6 +974,7 @@ extendClass(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object); | |
* NOTE1: 'params' can be omitted.<br/> | ||
* NOTE2: 'obj' parameter have been supported since | ||
* asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).<br/> | ||
* | ||
* @example | ||
* // default constructor | ||
* o = new KJUR.asn1.DERBitString(); | ||
|
@@ -1048,7 +1049,7 @@ KJUR.asn1.DERBitString = function(params) { | |
* o.setByBinaryString("001"); // leading zeros ignored | ||
*/ | ||
this.setByBinaryString = function(binaryString) { | ||
binaryString = binaryString.replace(/^0+/, ''); | ||
binaryString = binaryString.replace(/0+$/, ''); | ||
var unusedBits = 8 - binaryString.length % 8; | ||
if (unusedBits == 8) unusedBits = 0; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* asn1tsp-2.0.8.js (c) 2014-2022 Kenji Urushima | kjur.github.io/jsrsasign/license | ||
/* asn1tsp-2.0.9.js (c) 2014-2022 Kenji Urushima | kjur.github.io/jsrsasign/license | ||
*/ | ||
/* | ||
* asn1tsp.js - ASN.1 DER encoder classes for RFC 3161 Time Stamp Protocol | ||
|
@@ -16,7 +16,7 @@ | |
* @fileOverview | ||
* @name asn1tsp-1.0.js | ||
* @author Kenji Urushima [email protected] | ||
* @version jsrsasign 10.5.21 asn1tsp 2.0.8 (2022-May-23) | ||
* @version jsrsasign 10.5.22 asn1tsp 2.0.9 (2022-May-24) | ||
* @since jsrsasign 4.5.1 | ||
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a> | ||
*/ | ||
|
@@ -860,6 +860,10 @@ KJUR.asn1.tsp.PKIFailureInfo = function(params) { | |
if (typeof params == "number" && | ||
0 <= params && params <= 25) { | ||
d |= 1 << params; | ||
var s = d.toString(2); | ||
var r = ""; | ||
for (var i = s.length - 1; i >= 0; i--) r += s[i]; | ||
return r; | ||
} else if (typeof params == "string" && | ||
_nameValue[params] != undefined) { | ||
return namearraytobinstr([params], _nameValue); | ||
|
@@ -870,7 +874,7 @@ KJUR.asn1.tsp.PKIFailureInfo = function(params) { | |
throw new _Error("wrong params"); | ||
} | ||
|
||
return d.toString(2); | ||
return | ||
}; | ||
|
||
this.tohex = function() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* asn1x509-2.1.15.js (c) 2013-2022 Kenji Urushima | kjur.github.io/jsrsasign/license | ||
/* asn1x509-2.1.16.js (c) 2013-2022 Kenji Urushima | kjur.github.io/jsrsasign/license | ||
*/ | ||
/* | ||
* asn1x509.js - ASN.1 DER encoder classes for X.509 certificate | ||
|
@@ -16,7 +16,7 @@ | |
* @fileOverview | ||
* @name asn1x509-1.0.js | ||
* @author Kenji Urushima [email protected] | ||
* @version jsrsasign 10.5.21 asn1x509 2.1.15 (2022-May-23) | ||
* @version jsrsasign 10.5.22 asn1x509 2.1.16 (2022-May-24) | ||
* @since jsrsasign 2.1 | ||
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a> | ||
*/ | ||
|
@@ -638,35 +638,6 @@ KJUR.asn1.x509.KeyUsage = function(params) { | |
this.oid = "2.5.29.15"; | ||
if (params !== undefined) this.params = params; | ||
}; | ||
KJUR.asn1.x509.KeyUsage_bak = function(params) { | ||
KJUR.asn1.x509.KeyUsage.superclass.constructor.call(this, params); | ||
var _KEYUSAGE_NAME = X509.KEYUSAGE_NAME; | ||
|
||
this.getExtnValueHex = function() { | ||
return this.asn1ExtnValue.tohex(); | ||
}; | ||
|
||
this.oid = "2.5.29.15"; | ||
if (params !== undefined) { | ||
if (params.bin !== undefined) { | ||
this.asn1ExtnValue = new KJUR.asn1.DERBitString(params); | ||
} | ||
if (params.names !== undefined && | ||
params.names.length !== undefined) { | ||
var names = params.names; | ||
var s = "000000000"; | ||
for (var i = 0; i < names.length; i++) { | ||
for (var j = 0; j < _KEYUSAGE_NAME.length; j++) { | ||
if (names[i] === _KEYUSAGE_NAME[j]) { | ||
s = s.substring(0, j) + '1' + | ||
s.substring(j + 1, s.length); | ||
} | ||
} | ||
} | ||
this.asn1ExtnValue = new KJUR.asn1.DERBitString({bin: s}); | ||
} | ||
} | ||
}; | ||
extendClass(KJUR.asn1.x509.KeyUsage, KJUR.asn1.x509.Extension); | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* base64x-1.1.27 (c) 2012-2022 Kenji Urushima | kjur.github.io/jsrsasign/license | ||
/* base64x-1.1.28 (c) 2012-2022 Kenji Urushima | kjur.github.io/jsrsasign/license | ||
*/ | ||
/* | ||
* base64x.js - Base64url and supplementary functions for Tom Wu's base64.js library | ||
|
@@ -16,7 +16,7 @@ | |
* @fileOverview | ||
* @name base64x-1.1.js | ||
* @author Kenji Urushima [email protected] | ||
* @version jsrsasign 10.5.21 base64x 1.1.27 (2022-May-23) | ||
* @version jsrsasign 10.5.22 base64x 1.1.28 (2022-May-24) | ||
* @since jsrsasign 2.1 | ||
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a> | ||
*/ | ||
|
@@ -1799,15 +1799,21 @@ function binstrtobitstr(s) { | |
* | ||
* @example | ||
* db = { a: 0, b: 3, c: 8, d: 9, e: 17, f: 19 }; | ||
* namearraytobinstr(['a', 'c', 'd'], db) &rarr: '1100000001' | ||
* namearraytobinstr(['c', 'b'], db) &rarr: '100001000' | ||
* namearraytobinstr(['a', 'c', 'd'], db) &rarr: '1000000011' | ||
* namearraytobinstr(['c', 'b'], db) &rarr: '000100001' | ||
*/ | ||
function namearraytobinstr (namearray, namedb) { | ||
var d = 0; | ||
for (var i = 0; i < namearray.length; i++) { | ||
d |= 1 << namedb[namearray[i]]; | ||
} | ||
return d.toString(2); | ||
|
||
var s = d.toString(2); | ||
var r = ""; | ||
for (var i = s.length - 1; i >=0; i--) { | ||
r += s[i]; | ||
} | ||
return r; | ||
} | ||
|
||
// ======================================================= | ||
|