Skip to content

Commit 0db5476

Browse files
committed
8.0.9 release
1 parent 7a097a0 commit 0db5476

21 files changed

+1594
-1533
lines changed

Diff for: ChangeLog.txt

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11

22
ChangeLog for jsrsasign
33

4+
* Changes from 8.0.8 to 8.0.9 (2018-Apr-04)
5+
- critical bug fix for ASN.1 string class.
6+
When UTF-8 string is set to ASN.1 object,
7+
string has been garbled.
8+
- src/asn1 1.0.13 to 1.0.14
9+
- DERAbstractString.setString fixed for utf8.
10+
- src/asn1 1.1.2 to 1.1.3
11+
- following OIDs are added:
12+
T/title (2.5.4.12)
13+
description (2.5.4.13)
14+
organizationIdentifier (2.5.4.97)
15+
416
* Changes from 8.0.7 to 8.0.8 (2018-Apr-02)
517
- src/asn1x509 1.1.1 to 1.1.2
618
- GeneralName fix for dn and ldapdn of explicit.

Diff for: api/files.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ <h2><a href="symbols/src/asn1-1.0.js.html">asn1-1.0.js</a></h2>
441441

442442

443443
<dt class="heading">Version:</dt>
444-
<dd>asn1 1.0.13 (2017-Jun-02)</dd>
444+
<dd>asn1 1.0.14 (2018-Apr-03)</dd>
445445

446446

447447

@@ -574,7 +574,7 @@ <h2><a href="symbols/src/asn1x509-1.0.js.html">asn1x509-1.0.js</a></h2>
574574

575575

576576
<dt class="heading">Version:</dt>
577-
<dd>jsrsasign 8.0.0 asn1x509 1.1.2 (2018-Apr-02)</dd>
577+
<dd>jsrsasign 8.0.0 asn1x509 1.1.3 (2018-Apr-03)</dd>
578578

579579

580580

Diff for: api/symbols/KJUR.asn1.DERAbstractString.html

+13-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ <h1 class="classTitle">
548548
<td class="nameDescription">
549549
<div class="fixedFont"><b><a href="../symbols/KJUR.asn1.DERAbstractString.html#setString">setString</a></b>(newS)
550550
</div>
551-
<div class="description">set value by a string</div>
551+
<div class="description">set value by a string
552+
This method set value by string.</div>
552553
</td>
553554
</tr>
554555

@@ -700,12 +701,23 @@ <h1 class="classTitle">
700701
</div>
701702
<div class="description">
702703
set value by a string
704+
This method set value by string. <br/>
705+
NOTE: This method assumes that the argument string is
706+
UTF-8 encoded even though ASN.1 primitive
707+
such as IA5String or PrintableString doesn't
708+
support all of UTF-8 characters.
703709

704710

705711
</div>
706712

707713

708714

715+
<pre class="code">o = new KJUR.asn1.DERIA5String();
716+
o.setString("abc");
717+
o.setString("あいう");</pre>
718+
719+
720+
709721

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

Diff for: api/symbols/src/asn1-1.0.js.html

+1,129-1,119
Large diffs are not rendered by default.

Diff for: api/symbols/src/asn1x509-1.0.js.html

+379-375
Large diffs are not rendered by default.

Diff for: bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kjur-jsrsasign",
3-
"version": "8.0.8",
3+
"version": "8.0.9",
44
"main": "jsrsasign-all-min.js",
55
"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.",
66
"license": "MIT",

Diff for: jsrsasign-all-min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: jsrsasign-jwths-min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: jsrsasign-rsa-min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: min/asn1-1.0.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: min/asn1x509-1.0.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: npm/lib/jsrsasign-all-min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: npm/lib/jsrsasign-jwths-min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: npm/lib/jsrsasign-rsa-min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: npm/lib/jsrsasign.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: npm/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsrsasign",
3-
"version": "8.0.8",
3+
"version": "8.0.9",
44
"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).",
55
"main": "lib/jsrsasign.js",
66
"scripts": {

Diff for: src/asn1-1.0.js

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license
1+
/* asn1-1.0.14.js (c) 2013-2018 Kenji Urushima | kjur.github.com/jsrsasign/license
22
*/
33
/*
44
* asn1.js - ASN.1 DER encoder classes
55
*
6-
* Copyright (c) 2013-2017 Kenji Urushima ([email protected])
6+
* Copyright (c) 2013-2018 Kenji Urushima ([email protected])
77
*
88
* This software is licensed under the terms of the MIT License.
99
* https://kjur.github.io/jsrsasign/license
@@ -16,7 +16,7 @@
1616
* @fileOverview
1717
* @name asn1-1.0.js
1818
* @author Kenji Urushima [email protected]
19-
* @version asn1 1.0.13 (2017-Jun-02)
19+
* @version asn1 1.0.14 (2018-Apr-03)
2020
* @since jsrsasign 2.1
2121
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
2222
*/
@@ -529,12 +529,22 @@ KJUR.asn1.DERAbstractString = function(params) {
529529
* @memberOf KJUR.asn1.DERAbstractString#
530530
* @function
531531
* @param {String} newS value by a string to set
532+
* @description
533+
* This method set value by string. <br/>
534+
* NOTE: This method assumes that the argument string is
535+
* UTF-8 encoded even though ASN.1 primitive
536+
* such as IA5String or PrintableString doesn't
537+
* support all of UTF-8 characters.
538+
* @example
539+
* o = new KJUR.asn1.DERIA5String();
540+
* o.setString("abc");
541+
* o.setString("あいう");
532542
*/
533543
this.setString = function(newS) {
534544
this.hTLV = null;
535545
this.isModified = true;
536546
this.s = newS;
537-
this.hV = stohex(this.s);
547+
this.hV = utf8tohex(this.s).toLowerCase();
538548
};
539549

540550
/**

Diff for: src/asn1x509-1.0.js

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* asn1x509-1.1.2.js (c) 2013-2018 Kenji Urushima | kjur.github.com/jsrsasign/license
1+
/* asn1x509-1.1.3.js (c) 2013-2018 Kenji Urushima | kjur.github.com/jsrsasign/license
22
*/
33
/*
44
* asn1x509.js - ASN.1 DER encoder classes for X.509 certificate
@@ -16,7 +16,7 @@
1616
* @fileOverview
1717
* @name asn1x509-1.0.js
1818
* @author Kenji Urushima [email protected]
19-
* @version jsrsasign 8.0.0 asn1x509 1.1.2 (2018-Apr-02)
19+
* @version jsrsasign 8.0.0 asn1x509 1.1.3 (2018-Apr-03)
2020
* @since jsrsasign 2.1
2121
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
2222
*/
@@ -2403,14 +2403,16 @@ KJUR.asn1.x509.OID = new function(params) {
24032403
// other AttributeType name string
24042404
// http://blog.livedoor.jp/k_urushima/archives/656114.html
24052405
'SN': '2.5.4.4', // surname
2406+
'T': '2.5.4.12', // title
24062407
'DN': '2.5.4.49', // distinguishedName
24072408
'E': '1.2.840.113549.1.9.1', // emailAddress in MS.NET or Bouncy
24082409
// other AttributeType name string (no short name)
2410+
'description': '2.5.4.13',
24092411
'businessCategory': '2.5.4.15',
24102412
'postalCode': '2.5.4.17',
24112413
'serialNumber': '2.5.4.5',
24122414
'uniqueIdentifier': '2.5.4.45',
2413-
'description': '2.5.4.13',
2415+
'organizationIdentifier': '2.5.4.97',
24142416
'jurisdictionOfIncorporationL': '1.3.6.1.4.1.311.60.2.1.1',
24152417
'jurisdictionOfIncorporationSP':'1.3.6.1.4.1.311.60.2.1.2',
24162418
'jurisdictionOfIncorporationC': '1.3.6.1.4.1.311.60.2.1.3'
@@ -2449,23 +2451,25 @@ KJUR.asn1.x509.OID = new function(params) {
24492451

24502452
// X.500 AttributeType defined in RFC 4514
24512453
'commonName': '2.5.4.3',
2454+
'countryName': '2.5.4.6',
24522455
'localityName': '2.5.4.7',
24532456
'stateOrProvinceName': '2.5.4.8',
2457+
'streetAddress': '2.5.4.9',
24542458
'organizationName': '2.5.4.10',
24552459
'organizationalUnitName': '2.5.4.11',
2456-
'countryName': '2.5.4.6',
2457-
'streetAddress': '2.5.4.9',
24582460
'domainComponent': '0.9.2342.19200300.100.1.25',
24592461
'userId': '0.9.2342.19200300.100.1.1',
24602462
// other AttributeType name string
24612463
'surname': '2.5.4.4',
2464+
'title': '2.5.4.12',
24622465
'distinguishedName': '2.5.4.49',
24632466
'emailAddress': '1.2.840.113549.1.9.1',
24642467
// other AttributeType name string (no short name)
2468+
'description': '2.5.4.13',
24652469
'businessCategory': '2.5.4.15',
24662470
'postalCode': '2.5.4.17',
24672471
'uniqueIdentifier': '2.5.4.45',
2468-
'description': '2.5.4.13',
2472+
'organizationIdentifier': '2.5.4.97',
24692473
'jurisdictionOfIncorporationL': '1.3.6.1.4.1.311.60.2.1.1',
24702474
'jurisdictionOfIncorporationSP':'1.3.6.1.4.1.311.60.2.1.2',
24712475
'jurisdictionOfIncorporationC': '1.3.6.1.4.1.311.60.2.1.3',

Diff for: test/qunit-do-asn1.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,16 @@
131131

132132
test("UTF8String Test", function() {
133133
var d = new KJUR.asn1.DERUTF8String();
134-
expect(2);
135134
d.setString('aaa');
136135
equal(d.getEncodedHex(), "0c03616161", "UTF8String aaa");
137136
d.setString('bbb');
138137
equal(d.getEncodedHex(), "0c03626262", "UTF8String bbb");
138+
d.setString('あ');
139+
equal(d.getEncodedHex(), "0c03e38182", "UTF8String あ");
139140
});
140141

141142
test("NumericString Test", function() {
142143
var d = new KJUR.asn1.DERNumericString();
143-
expect(2);
144144
d.setString('aaa');
145145
equal(d.getEncodedHex(), "1203616161", "NumericString aaa");
146146
d.setString('bbb');
@@ -167,11 +167,12 @@
167167

168168
test("IA5String Test", function() {
169169
var d = new KJUR.asn1.DERIA5String();
170-
expect(2);
171170
d.setString('aaa');
172171
equal(d.getEncodedHex(), "1603616161", "IA5String aaa");
173172
d.setString('bbb');
174173
equal(d.getEncodedHex(), "1603626262", "IA5String bbb");
174+
d.setString('あ');
175+
equal(d.getEncodedHex(), "1603e38182", "IA5String あ");
175176
});
176177

177178
test("UTCTime Test", function() {

Diff for: test/qunit-do-asn1x509.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@
133133
"301b310b3009060355040613025553310c300a060355040a0c03616161",
134134
"setByString(/C=US/O=aaa)");
135135

136+
o = new KJUR.asn1.x509.X500Name();
137+
o.setByString("/C=US/O=あ");
138+
equal(o.getEncodedHex(),
139+
"301b310b3009060355040613025553310c300a060355040a0c03e38182",
140+
"setByString(/C=US/O=あ)");
141+
136142
o = new KJUR.asn1.x509.X500Name();
137143
o.setByObject({C: "US", O: "aaa"});
138144
equal(o.getEncodedHex(),
@@ -166,7 +172,6 @@
166172
});
167173

168174
test("AttributeTypeAndValue class test", function() {
169-
expect(3);
170175
var o1 = new KJUR.asn1.x509.AttributeTypeAndValue();
171176
o1.setByAttrTypeAndValueStr("O", "aaa");
172177
equal(o1.getEncodedHex(), "300a060355040a0c03616161", "setByAttrTypeAndValueStr O aaa");
@@ -177,6 +182,9 @@
177182

178183
var o3 = new KJUR.asn1.x509.AttributeTypeAndValue({'str':'O=aaa'});
179184
equal(o3.getEncodedHex(), "300a060355040a0c03616161", "constructor str O=aaa");
185+
186+
var o4 = new KJUR.asn1.x509.AttributeTypeAndValue({'str':'O=あ'});
187+
equal(o4.getEncodedHex(), "300a060355040a0c03e38182", "constructor str O=あ");
180188
});
181189

182190
// === BEGIN Other ASN1 structure class ======================================

Diff for: tool/tool_ca.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!DOCTYPE html>
2-
<html>
3-
2+
<html lang="en">
43
<head>
5-
<meta charset='utf-8' />
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+
<meta charset="utf-8" />
66
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
77
<meta name="description" content="jsrsasign : The 'jsrsasign' (RSA-Sign JavaScript Library) is a open source free pure JavaScript implementation of PKCS#1 v2.1 RSASSA-PKCS1-v1_5 RSA signing and validation algorithm." />
88

0 commit comments

Comments
 (0)