Skip to content

Commit 04af7f5

Browse files
committed
10.8.4 release
1 parent d679050 commit 04af7f5

28 files changed

+5923
-5521
lines changed

ChangeLog.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11

22
ChangeLog for jsrsasign
33

4+
more SubjectDirectoryExtension support
5+
* Changes from 10.8.3 to 10.8.4 (2023-Apr-26)
6+
- src/asn1x509.js
7+
- SubjectDirectoryAttributes class
8+
- add array of array support for arbitrary attribute value
9+
- src/x509.js
10+
- add X509.getExtSubjectDirectoryAttributes method for
11+
ExtSubjectDirectoryAttributes extension
12+
- update X509.getExtParam method
13+
- support SubjectDirectoryAttributes
14+
- parse unknown extension as ASN.1
15+
- src/base64x.js
16+
- bugfix foldnl function: when length of s is multiple of n,
17+
result has unnecessary new line in the end of string.
18+
- qunit-do-{asn1x509,x509-ext,base64x,x500-param}.html
19+
- update and add some test cases for above
20+
421
CABF SMIMEBR OID support
522
* Changes from 10.8.2 to 10.8.3 (2023-Apr-20)
623
- src/asn1x509.js

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ HIGHLIGHTS
5353
- no dependency to other library
5454
- no dependency to [W3C Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/) nor [OpenSSL](https://www.openssl.org/)
5555
- no dependency on newer ECMAScirpt function. So old browsers also supported.
56-
- 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)
56+
- 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)
5757
- supports "Add-on" architecture
5858

5959
INSTALL

api/files.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ <h2><a href="symbols/src/asn1x509-1.0.js.html">asn1x509-1.0.js</a></h2>
668668

669669

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

673673

674674

@@ -687,7 +687,7 @@ <h2><a href="symbols/src/base64x-1.1.js.html">base64x-1.1.js</a></h2>
687687

688688

689689
<dt class="heading">Version:</dt>
690-
<dd>jsrsasign 10.8.0 base64x 1.1.32 (2023-Apr-08)</dd>
690+
<dd>jsrsasign 10.8.4 base64x 1.1.33 (2023-Apr-26)</dd>
691691

692692

693693

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

897897

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

901901

902902

api/symbols/KJUR.asn1.x509.SubjectDirectoryAttributes.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,15 @@ <h1 class="classTitle">
625625
AttributeType ::= OBJECT IDENTIFIER
626626
AttributeValue ::= ANY DEFINED BY AttributeType
627627
</pre>
628+
Value of member "array" is an array which as following associative arrays as elements:
629+
<ul>
630+
<li>attr: OID name or value of attribute type (ex. "gender" or "1.2.3.4")</li>
631+
<li>str: attribute value of pre defined types (See example for registered attribute types)</li>
632+
<li>array: array of ASN.1 parameters as attribute value (See KJUR.asn1.ASN1Util#newObject)</li>
633+
</ul>
634+
<br/>
635+
NOTE: From jsrsasign 10.8.4, member "array in array" supported for an arbitrary
636+
attribute value.
628637

629638
</div>
630639

@@ -637,7 +646,8 @@ <h1 class="classTitle">
637646
{ attr: "placeOfBirth", str: "Tokyo" },
638647
{ attr: "gender", str: "F" },
639648
{ attr: "countryOfCitizenship", str: "JP" },
640-
{ attr: "countryOfResidence", str: "JP" }
649+
{ attr: "countryOfResidence", str: "JP" },
650+
{ attr: "1.2.3.4.5", array: [{prnstr: {str: "aaa"}}] }
641651
]
642652
});</pre>
643653

@@ -667,6 +677,13 @@ <h1 class="classTitle">
667677

668678

669679

680+
<dl class="detailList">
681+
<dt class="heading">See:</dt>
682+
683+
<dd></dd>
684+
685+
</dl>
686+
670687

671688
</div>
672689

api/symbols/X509.html

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,19 @@ <h1 class="classTitle">
10851085
</td>
10861086
</tr>
10871087

1088+
<tr>
1089+
<td class="attributes">&nbsp;</td>
1090+
<td class="nameDescription">
1091+
<div class="fixedFont"><b><a href="../symbols/X509.html#getExtSubjectDirectoryAttributes">getExtSubjectDirectoryAttributes</a></b>(hExtV, critical)
1092+
</div>
1093+
<div class="description">parse SubjectDirectoryAttributes extension as JSON object<br/>
1094+
This method parses
1095+
SubjectDirectoryAttributes extension value defined in the
1096+
defined in <a href="https://tools.ietf.org/html/rfc3739#section-3.3.2">
1097+
RFC 3739 Qualified Certificate Profile section 3.3.2</a> as JSON object.</div>
1098+
</td>
1099+
</tr>
1100+
10881101
<tr>
10891102
<td class="attributes">&nbsp;</td>
10901103
<td class="nameDescription">
@@ -4734,6 +4747,97 @@ <h1 class="classTitle">
47344747

47354748

47364749

4750+
<hr />
4751+
4752+
<a name="getExtSubjectDirectoryAttributes"> </a>
4753+
<div class="fixedFont">
4754+
4755+
<span class="light">{Array}</span>
4756+
<b>getExtSubjectDirectoryAttributes</b>(hExtV, critical)
4757+
4758+
</div>
4759+
<div class="description">
4760+
parse SubjectDirectoryAttributes extension as JSON object<br/>
4761+
This method parses
4762+
SubjectDirectoryAttributes extension value defined in the
4763+
defined in <a href="https://tools.ietf.org/html/rfc3739#section-3.3.2">
4764+
RFC 3739 Qualified Certificate Profile section 3.3.2</a> as JSON object.
4765+
<pre>
4766+
SubjectDirectoryAttributes ::= Attributes
4767+
Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
4768+
Attribute ::= SEQUENCE {
4769+
type AttributeType
4770+
values SET OF AttributeValue }
4771+
AttributeType ::= OBJECT IDENTIFIER
4772+
AttributeValue ::= ANY DEFINED BY AttributeType
4773+
</pre>
4774+
<br/>
4775+
Result of this method can be passed to
4776+
<a href="../symbols/KJUR.asn1.x509.SubjectDirectoryAttributes.html">KJUR.asn1.x509.SubjectDirectoryAttributes</a> constructor.
4777+
4778+
4779+
</div>
4780+
4781+
4782+
4783+
<pre class="code">x.getExtSubjectDirectoryAttributes(<<extn hex value >>) &rarr;
4784+
{ "extname": "SubjectDirectoryAttributes",
4785+
"array": [
4786+
{ "attr": "gender", "array": [{"prnstr": {"str": "female"}}] },
4787+
{ "attr": "1.2.3.4.5", "array": [{"prnstr": {"str": "aaa"}}, {"utf8str": {"str": "bbb"}}] }
4788+
] }</pre>
4789+
4790+
4791+
4792+
4793+
<dl class="detailList">
4794+
<dt class="heading">Parameters:</dt>
4795+
4796+
<dt>
4797+
<span class="light fixedFont">{String}</span> <b>hExtV</b>
4798+
4799+
</dt>
4800+
<dd>hexadecimal string of extension value</dd>
4801+
4802+
<dt>
4803+
<span class="light fixedFont">{Boolean}</span> <b>critical</b>
4804+
4805+
</dt>
4806+
<dd>flag</dd>
4807+
4808+
</dl>
4809+
4810+
4811+
4812+
<dl class="detailList">
4813+
<dt class="heading">Since:</dt>
4814+
<dd>jsrsasign 10.8.4 x509 2.1.4</dd>
4815+
</dl>
4816+
</dl>
4817+
4818+
4819+
4820+
<dl class="detailList">
4821+
<dt class="heading">Returns:</dt>
4822+
4823+
<dd><span class="light fixedFont">{Array}</span> JSON object of parsed SubjectDirectoryAttributes extension</dd>
4824+
4825+
</dl>
4826+
4827+
4828+
4829+
<dl class="detailList">
4830+
<dt class="heading">See:</dt>
4831+
4832+
<dd><a href="../symbols/KJUR.asn1.x509.SubjectDirectoryAttributes.html">KJUR.asn1.x509.SubjectDirectoryAttributes</a></dd>
4833+
4834+
<dd><a href="../symbols/X509.html#getExtParamArray">X509#getExtParamArray</a></dd>
4835+
4836+
<dd><a href="../symbols/X509.html#getExtParam">X509#getExtParam</a></dd>
4837+
4838+
</dl>
4839+
4840+
47374841
<hr />
47384842

47394843
<a name="getExtSubjectKeyIdentifier"> </a>

0 commit comments

Comments
 (0)