Skip to content

Commit

Permalink
10.5.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Feb 15, 2022
1 parent 17f0f73 commit 7b263e8
Show file tree
Hide file tree
Showing 26 changed files with 2,276 additions and 1,708 deletions.
27 changes: 27 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@

ChangeLog for jsrsasign

ASN.1 parser update and fix
* Changes from 10.5.3 to 10.5.4 (2022-Feb-15)
- src/asn1.js
- DERTaggedObject
- refactoring
- add {tag: xx, str:"aaa"} parameter support
- add {tag: xx, hex:"616161"} parameter support
- setASN1Object method now *deprecated*. Please use setByParam
- src/asn1hex.js
- ASN1HEX.parse
- add encapsulated OctetString, BitString support
- add encapsulated structured TaggedObject support
- changed to return binary string for 3byte or less BitString value
- ObjectIdentifier fix when undefined OID name
- src/base64x.js
- added bitstrtobinstr/binstrtobitstr
- utf8tohex fix for lower case hexadecimal string
- hextoutf8 fix for improper hexadecimal string for UTF-8
- bitstrtoint/inttobitstr fix for error case return
- test/qunit-do-asn1.html
- TaggedObject test case update
- test/qunit-do-asn1hex-parse.html
- BitString, TaggedObject test case update
- test/qunit-do-base64x.html
- hextoutf8/utf8tohex testcase update
- bitstrtobinstr/binstrtobitstr testcase added

add OtherName support in GeneralName
* Changes from 10.5.2 to 10.5.3 (2022-Feb-10)
- add otherName support in GeneralName by PR
Expand Down
6 changes: 3 additions & 3 deletions api/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ <h2><a href="symbols/src/asn1-1.0.js.html">asn1-1.0.js</a></h2>


<dt class="heading">Version:</dt>
<dd>jsrsasign 10.4.1 asn1 1.0.22 (2021-Sep-30)</dd>
<dd>jsrsasign 10.5.4 asn1 1.0.23 (2022-Feb-14)</dd>



Expand Down Expand Up @@ -601,7 +601,7 @@ <h2><a href="symbols/src/asn1hex-1.1.js.html">asn1hex-1.1.js</a></h2>


<dt class="heading">Version:</dt>
<dd>jsrsasign 10.5.3 asn1hex 1.2.10 (2022-Feb-10)</dd>
<dd>jsrsasign 10.5.4 asn1hex 1.2.11 (2022-Feb-14)</dd>



Expand Down Expand Up @@ -677,7 +677,7 @@ <h2><a href="symbols/src/base64x-1.1.js.html">base64x-1.1.js</a></h2>


<dt class="heading">Version:</dt>
<dd>jsrsasign 10.1.13 base64x 1.1.20 (2021-Mar-07)</dd>
<dd>jsrsasign 10.5.4 base64x 1.1.21 (2022-Feb-14)</dd>



Expand Down
2 changes: 1 addition & 1 deletion api/symbols/KJUR.asn1.DERBitString.html
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ <h1 class="classTitle">


<pre class="code">o = new KJUR.asn1.DERBitString();
o.setByBooleanArray("01011");</pre>
o.setByBinaryString("01011");</pre>



Expand Down
7 changes: 7 additions & 0 deletions api/symbols/KJUR.asn1.DERTaggedObject.html
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,13 @@ <h1 class="classTitle">
</dl>


<dl class="detailList">
<dt class="heading">Deprecated:</dt>
<dt>
since jsrsasign 10.5.4 please use setByParam instead
</dt>
</dl>




Expand Down
188 changes: 184 additions & 4 deletions api/symbols/global__.html
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,27 @@ <h1 class="classTitle">
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/global__.html#binstrtobitstr">binstrtobitstr</a></b>(s)
</div>
<div class="description">convert from binary string to hexadecimal string of ASN.1 BitString value with unused bit<br/>
This function converts from an binary string (ex.</div>
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/global__.html#bitstrtobinstr">bitstrtobinstr</a></b>(h)
</div>
<div class="description">convert from hexadecimal string of ASN.1 BitString value with unused bit to binary string<br/>
This function converts from hexadecimal string of ASN.1 BitString
value with unused bit to its integer value.</div>
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
Expand Down Expand Up @@ -1684,6 +1705,153 @@ <h1 class="classTitle">



<hr />

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

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

</div>
<div class="description">
convert from binary string to hexadecimal string of ASN.1 BitString value with unused bit<br/>
This function converts from an binary string (ex. "101") to
hexadecimal string of ASN.1 BitString value
with unused bit (ex. "05a0"). <br/>
When "s" is not binary string, this returns null.

<br />
<i>Defined in: </i> <a href="../symbols/src/base64x-1.1.js.html">base64x-1.1.js</a>.


</div>



<pre class="code">binstrtobitstr("101") &rarr; "05a0"
binstrtobitstr("11001") &rarr; "03c8"
binstrtobitstr("101000001") &rarr; "07a080"
binstrtobitstr(101) &rarr; null // not number
binstrtobitstr("xyz") &rarr; null // not binary string</pre>




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

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

</dt>
<dd>binary string (ex. "101")</dd>

</dl>



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>jsrsasign 10.5.4 base64x 1.1.21</dd>
</dl>
</dl>



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

<dd><span class="light fixedFont">{string}</span> hexadecimal string of ASN.1 BitString value with unused bit</dd>

</dl>



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

<dd><a href="../symbols/global__.html#bitstrtobinstr">bitstrtobinstr</a></dd>

<dd><a href="../symbols/global__.html#inttobitstr">inttobitstr</a></dd>

<dd><a href="../symbols/KJUR.asn1.DERBitString.html">KJUR.asn1.DERBitString</a></dd>

</dl>


<hr />

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

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

</div>
<div class="description">
convert from hexadecimal string of ASN.1 BitString value with unused bit to binary string<br/>
This function converts from hexadecimal string of ASN.1 BitString
value with unused bit to its integer value. <br/>
When an improper hexadecimal string of BitString value
is applied, this returns null.

<br />
<i>Defined in: </i> <a href="../symbols/src/base64x-1.1.js.html">base64x-1.1.js</a>.


</div>



<pre class="code">bitstrtobinstr("05a0") &rarr; "101"
bitstrtobinstr("07a080") &rarr; "101000001"
bitstrtoint(502) &rarr; null // non ASN.1 BitString value
bitstrtoint("ff00") &rarr; -1 // for improper BitString value</pre>




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

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

</dt>
<dd>hexadecimal string of ASN.1 BitString value with unused bit</dd>

</dl>



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>jsrsasign 10.5.4 base64x 1.1.21</dd>
</dl>
</dl>



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

<dd><span class="light fixedFont">{string}</span> binary string</dd>

</dl>



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

<dd><a href="../symbols/global__.html#binstrtobitstr">binstrtobitstr</a></dd>

<dd><a href="../symbols/global__.html#inttobitstr">inttobitstr</a></dd>

</dl>


<hr />

<a name="bitstrtoint"> </a>
Expand All @@ -1696,7 +1864,9 @@ <h1 class="classTitle">
<div class="description">
convert from hexadecimal string of ASN.1 BitString value with unused bit to integer value<br/>
This function converts from hexadecimal string of ASN.1 BitString
value with unused bit to its integer value.
value with unused bit to its integer value. <br/>
When an improper hexadecimal string of BitString value
is applied, this returns -1.

<br />
<i>Defined in: </i> <a href="../symbols/src/base64x-1.1.js.html">base64x-1.1.js</a>.
Expand All @@ -1710,7 +1880,11 @@ <h1 class="classTitle">
bitstrtoint("03c8") &rarr; 25
// "02fff8" &rarr; 0xfff8 unusedbit=02 &rarr; 1111111111111000b unusedbit=02
// 11111111111110b &rarr; 16382
bitstrtoint("02fff8") &rarr; 16382</pre>
bitstrtoint("02fff8") &rarr; 16382
bitstrtoint("05a0") &rarr; 5 (=101b)
bitstrtoint("ff00") &rarr; -1 // for improper BitString value
bitstrtoint("05a0").toString(2) &rarr; "101"
bitstrtoint("07a080").toString(2) &rarr; "101000001"</pre>



Expand Down Expand Up @@ -2763,7 +2937,8 @@ <h1 class="classTitle">
convert from integer value to hexadecimal string of ASN.1 BitString value with unused bit<br/>
This function converts from an integer value to
hexadecimal string of ASN.1 BitString value
with unused bit.
with unused bit. <br/>
When "n" is not non-negative number, this returns null

<br />
<i>Defined in: </i> <a href="../symbols/src/base64x-1.1.js.html">base64x-1.1.js</a>.
Expand All @@ -2774,7 +2949,12 @@ <h1 class="classTitle">


<pre class="code">// 25 &rarr; 11001b &rarr; 11001000b unusedbit=03 &rarr; 0xc8 unusedbit=03 &rarr; "03c8"
inttobitstr(25) &rarr; "03c8"</pre>
inttobitstr(25) &rarr; "03c8"
inttobitstr(-3) &rarr; null
inttobitstr("abc") &rarr; null
inttobitstr(parseInt("11001", 2)) &rarr; "03c8"
inttobitstr(parseInt("101", 2)) &rarr; "05a0"
inttobitstr(parseInt("101000001", 2)) &rarr; "07a080"</pre>



Expand Down
Loading

0 comments on commit 7b263e8

Please sign in to comment.