Skip to content

Commit

Permalink
10.8.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Apr 26, 2023
1 parent d679050 commit 04af7f5
Show file tree
Hide file tree
Showing 28 changed files with 5,923 additions and 5,521 deletions.
17 changes: 17 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@

ChangeLog for jsrsasign

more SubjectDirectoryExtension support
* Changes from 10.8.3 to 10.8.4 (2023-Apr-26)
- src/asn1x509.js
- SubjectDirectoryAttributes class
- add array of array support for arbitrary attribute value
- src/x509.js
- add X509.getExtSubjectDirectoryAttributes method for
ExtSubjectDirectoryAttributes extension
- update X509.getExtParam method
- support SubjectDirectoryAttributes
- parse unknown extension as ASN.1
- src/base64x.js
- bugfix foldnl function: when length of s is multiple of n,
result has unnecessary new line in the end of string.
- qunit-do-{asn1x509,x509-ext,base64x,x500-param}.html
- update and add some test cases for above

CABF SMIMEBR OID support
* Changes from 10.8.2 to 10.8.3 (2023-Apr-20)
- src/asn1x509.js
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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 [1M+ npm downloads/month](https://npm-stat.com/charts.html?package=jsrsasign&from=2016-05-01&to=2023-04-05)
- very popular crypto library with [1M+ npm downloads/month](https://npm-stat.com/charts.html?package=jsrsasign&from=2016-05-01&to=2023-04-20)
- supports "Add-on" architecture

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


<dt class="heading">Version:</dt>
<dd>jsrsasign 10.6.1 asn1x509 2.1.18 (2022-Nov-20)</dd>
<dd>jsrsasign 10.8.4 asn1x509 2.1.20 (2023-Apr-26)</dd>



Expand All @@ -687,7 +687,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.8.0 base64x 1.1.32 (2023-Apr-08)</dd>
<dd>jsrsasign 10.8.4 base64x 1.1.33 (2023-Apr-26)</dd>



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


<dt class="heading">Version:</dt>
<dd>jsrsasign 10.8.0 x509 2.1.3 (2023-Apr-08)</dd>
<dd>jsrsasign 10.8.4 x509 2.1.4 (2023-Apr-26)</dd>



Expand Down
19 changes: 18 additions & 1 deletion api/symbols/KJUR.asn1.x509.SubjectDirectoryAttributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,15 @@ <h1 class="classTitle">
AttributeType ::= OBJECT IDENTIFIER
AttributeValue ::= ANY DEFINED BY AttributeType
</pre>
Value of member "array" is an array which as following associative arrays as elements:
<ul>
<li>attr: OID name or value of attribute type (ex. "gender" or "1.2.3.4")</li>
<li>str: attribute value of pre defined types (See example for registered attribute types)</li>
<li>array: array of ASN.1 parameters as attribute value (See KJUR.asn1.ASN1Util#newObject)</li>
</ul>
<br/>
NOTE: From jsrsasign 10.8.4, member "array in array" supported for an arbitrary
attribute value.

</div>

Expand All @@ -637,7 +646,8 @@ <h1 class="classTitle">
{ attr: "placeOfBirth", str: "Tokyo" },
{ attr: "gender", str: "F" },
{ attr: "countryOfCitizenship", str: "JP" },
{ attr: "countryOfResidence", str: "JP" }
{ attr: "countryOfResidence", str: "JP" },
{ attr: "1.2.3.4.5", array: [{prnstr: {str: "aaa"}}] }
]
});</pre>

Expand Down Expand Up @@ -667,6 +677,13 @@ <h1 class="classTitle">



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

<dd></dd>

</dl>


</div>

Expand Down
104 changes: 104 additions & 0 deletions api/symbols/X509.html
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,19 @@ <h1 class="classTitle">
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/X509.html#getExtSubjectDirectoryAttributes">getExtSubjectDirectoryAttributes</a></b>(hExtV, critical)
</div>
<div class="description">parse SubjectDirectoryAttributes extension as JSON object<br/>
This method parses
SubjectDirectoryAttributes extension value defined in the
defined in <a href="https://tools.ietf.org/html/rfc3739#section-3.3.2">
RFC 3739 Qualified Certificate Profile section 3.3.2</a> as JSON object.</div>
</td>
</tr>

<tr>
<td class="attributes">&nbsp;</td>
<td class="nameDescription">
Expand Down Expand Up @@ -4734,6 +4747,97 @@ <h1 class="classTitle">



<hr />

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

<span class="light">{Array}</span>
<b>getExtSubjectDirectoryAttributes</b>(hExtV, critical)

</div>
<div class="description">
parse SubjectDirectoryAttributes extension as JSON object<br/>
This method parses
SubjectDirectoryAttributes extension value defined in the
defined in <a href="https://tools.ietf.org/html/rfc3739#section-3.3.2">
RFC 3739 Qualified Certificate Profile section 3.3.2</a> as JSON object.
<pre>
SubjectDirectoryAttributes ::= Attributes
Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
Attribute ::= SEQUENCE {
type AttributeType
values SET OF AttributeValue }
AttributeType ::= OBJECT IDENTIFIER
AttributeValue ::= ANY DEFINED BY AttributeType
</pre>
<br/>
Result of this method can be passed to
<a href="../symbols/KJUR.asn1.x509.SubjectDirectoryAttributes.html">KJUR.asn1.x509.SubjectDirectoryAttributes</a> constructor.


</div>



<pre class="code">x.getExtSubjectDirectoryAttributes(<<extn hex value >>) &rarr;
{ "extname": "SubjectDirectoryAttributes",
"array": [
{ "attr": "gender", "array": [{"prnstr": {"str": "female"}}] },
{ "attr": "1.2.3.4.5", "array": [{"prnstr": {"str": "aaa"}}, {"utf8str": {"str": "bbb"}}] }
] }</pre>




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

<dt>
<span class="light fixedFont">{String}</span> <b>hExtV</b>

</dt>
<dd>hexadecimal string of extension value</dd>

<dt>
<span class="light fixedFont">{Boolean}</span> <b>critical</b>

</dt>
<dd>flag</dd>

</dl>



<dl class="detailList">
<dt class="heading">Since:</dt>
<dd>jsrsasign 10.8.4 x509 2.1.4</dd>
</dl>
</dl>



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

<dd><span class="light fixedFont">{Array}</span> JSON object of parsed SubjectDirectoryAttributes extension</dd>

</dl>



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

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

<dd><a href="../symbols/X509.html#getExtParamArray">X509#getExtParamArray</a></dd>

<dd><a href="../symbols/X509.html#getExtParam">X509#getExtParam</a></dd>

</dl>


<hr />

<a name="getExtSubjectKeyIdentifier"> </a>
Expand Down
Loading

0 comments on commit 04af7f5

Please sign in to comment.