Skip to content

Commit

Permalink
6.1.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kjur committed Sep 25, 2016
1 parent 171b946 commit 6ad03d2
Show file tree
Hide file tree
Showing 14 changed files with 1,107 additions and 753 deletions.
7 changes: 7 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

ChangeLog for jsrsasign

* Changes between 6.1.0 to 6.1.1 (2016-Sep-25)
- asn1 1.0.10 to 1.0.11
- encapsulated ASN.1 structure supported
in DEROctetString and DERBitString.
- API document update
- tool_asn1encoder.html added

* Changes between 6.0.1 to 6.1.0 (2016-Sep-24)
- asn1ocsp 1.0.0
- now start to add OCSP protocol support
Expand Down
2 changes: 1 addition & 1 deletion api/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ <h2><a href="symbols/src/asn1-1.0.js.html">asn1-1.0.js</a></h2>


<dt class="heading">Version:</dt>
<dd>asn1 1.0.10 (2016-Aug-27)</dd>
<dd>asn1 1.0.11 (2016-Sep-25)</dd>



Expand Down
26 changes: 25 additions & 1 deletion api/symbols/KJUR.asn1.DERBitString.html
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,37 @@ <h1 class="classTitle">
<li>bin - specify binary string (ex. '10111')</li>
<li>array - specify array of boolean (ex. [true,false,true,true])</li>
<li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>
<li>obj - specify <a href="../symbols/KJUR.asn1.ASN1Util.html#.newObject">KJUR.asn1.ASN1Util.newObject</a>
argument for "BitString encapsulates" structure.</li>
</ul>
NOTE: 'params' can be omitted.
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/>

</div>



<pre class="code">// default constructor
o = new KJUR.asn1.DERBitString();
// initialize with binary string
o = new KJUR.asn1.DERBitString({bin: "1011"});
// initialize with boolean array
o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});
// initialize with hexadecimal string (04 is unused bits)
o = new KJUR.asn1.DEROctetString({hex: "04bac0"});
// initialize with ASN1Util.newObject argument for encapsulated
o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
// above generates a ASN.1 data like this:
// BIT STRING, encapsulates {
// SEQUENCE {
// INTEGER 3
// PrintableString 'aaa'
// }
// }</pre>






Expand Down
4 changes: 2 additions & 2 deletions api/symbols/KJUR.asn1.DEREnumerated.html
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,8 @@ <h1 class="classTitle">


<pre class="code">new KJUR.asn1.DEREnumerated(123);
new KJUR.asn1.DEREnumerated({'int': 123});
new KJUR.asn1.DEREnumerated({'hex': '1fad'});</pre>
new KJUR.asn1.DEREnumerated({int: 123});
new KJUR.asn1.DEREnumerated({hex: '1fad'});</pre>



Expand Down
36 changes: 32 additions & 4 deletions api/symbols/KJUR.asn1.DEROctetString.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ <h1 class="classTitle">
<div class="fixedFont">
<b><a href="../symbols/KJUR.asn1.DEROctetString.html#constructor">KJUR.asn1.DEROctetString</a></b>(params)
</div>
<div class="description">class for ASN.1 DER OctetString
</div>
<div class="description">class for ASN.1 DER OctetString<br/>
This class provides ASN.1 OctetString simple type.</div>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -501,13 +501,41 @@ <h1 class="classTitle">
</div>

<div class="description">
class for ASN.1 DER OctetString

class for ASN.1 DER OctetString<br/>
This class provides ASN.1 OctetString simple type.<br/>
Supported "params" attributes are:
<ul>
<li>str - to set a string as a value</li>
<li>hex - to set a hexadecimal string as a value</li>
<li>obj - to set a encapsulated ASN.1 value by JSON object
which is defined in <a href="../symbols/KJUR.asn1.ASN1Util.html#.newObject">KJUR.asn1.ASN1Util.newObject</a></li>
</ul>
NOTE: A parameter 'obj' have been supported
for "OCTET STRING, encapsulates" structure.
since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).

</div>



<pre class="code">// default constructor
o = new KJUR.asn1.DEROctetString();
// initialize with string
o = new KJUR.asn1.DEROctetString({str: "aaa"});
// initialize with hexadecimal string
o = new KJUR.asn1.DEROctetString({hex: "616161"});
// initialize with ASN1Util.newObject argument
o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
// above generates a ASN.1 data like this:
// OCTET STRING, encapsulates {
// SEQUENCE {
// INTEGER 3
// PrintableString 'aaa'
// }
// }</pre>





<dl class="detailList">
Expand Down
1,507 changes: 782 additions & 725 deletions api/symbols/src/asn1-1.0.js.html

Large diffs are not rendered by default.

69 changes: 63 additions & 6 deletions asn1-1.0.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! asn1-1.0.10.js (c) 2013-2016 Kenji Urushima | kjur.github.com/jsrsasign/license
/*! asn1-1.0.11.js (c) 2013-2016 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
/*
* asn1.js - ASN.1 DER encoder classes
Expand All @@ -16,7 +16,7 @@
* @fileOverview
* @name asn1-1.0.js
* @author Kenji Urushima [email protected]
* @version asn1 1.0.10 (2016-Aug-27)
* @version asn1 1.0.11 (2016-Sep-25)
* @since jsrsasign 2.1
* @license <a href="http://kjur.github.io/jsrsasign/license/">MIT License</a>
*/
Expand Down Expand Up @@ -827,10 +827,36 @@ YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);
* <li>bin - specify binary string (ex. '10111')</li>
* <li>array - specify array of boolean (ex. [true,false,true,true])</li>
* <li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>
* <li>obj - specify {@link KJUR.asn1.ASN1Util.newObject}
* argument for "BitString encapsulates" structure.</li>
* </ul>
* NOTE: 'params' can be omitted.
* 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();
* // initialize with binary string
* o = new KJUR.asn1.DERBitString({bin: "1011"});
* // initialize with boolean array
* o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});
* // initialize with hexadecimal string (04 is unused bits)
* o = new KJUR.asn1.DEROctetString({hex: "04bac0"});
* // initialize with ASN1Util.newObject argument for encapsulated
* o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
* // above generates a ASN.1 data like this:
* // BIT STRING, encapsulates {
* // SEQUENCE {
* // INTEGER 3
* // PrintableString 'aaa'
* // }
* // }
*/
KJUR.asn1.DERBitString = function(params) {
if (params !== undefined && typeof params.obj !== "undefined") {
var o = KJUR.asn1.ASN1Util.newObject(params.obj);
params.hex = "00" + o.getEncodedHex();
}
KJUR.asn1.DERBitString.superclass.constructor.call(this);
this.hT = "03";

Expand Down Expand Up @@ -954,15 +980,46 @@ YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);

// ********************************************************************
/**
* class for ASN.1 DER OctetString
* class for ASN.1 DER OctetString<br/>
* @name KJUR.asn1.DEROctetString
* @class class for ASN.1 DER OctetString
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
* @extends KJUR.asn1.DERAbstractString
* @description
* This class provides ASN.1 OctetString simple type.<br/>
* Supported "params" attributes are:
* <ul>
* <li>str - to set a string as a value</li>
* <li>hex - to set a hexadecimal string as a value</li>
* <li>obj - to set a encapsulated ASN.1 value by JSON object
* which is defined in {@link KJUR.asn1.ASN1Util.newObject}</li>
* </ul>
* NOTE: A parameter 'obj' have been supported
* for "OCTET STRING, encapsulates" structure.
* since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).
* @see KJUR.asn1.DERAbstractString - superclass
* @example
* // default constructor
* o = new KJUR.asn1.DEROctetString();
* // initialize with string
* o = new KJUR.asn1.DEROctetString({str: "aaa"});
* // initialize with hexadecimal string
* o = new KJUR.asn1.DEROctetString({hex: "616161"});
* // initialize with ASN1Util.newObject argument
* o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
* // above generates a ASN.1 data like this:
* // OCTET STRING, encapsulates {
* // SEQUENCE {
* // INTEGER 3
* // PrintableString 'aaa'
* // }
* // }
*/
KJUR.asn1.DEROctetString = function(params) {
if (params !== undefined && typeof params.obj !== "undefined") {
var o = KJUR.asn1.ASN1Util.newObject(params.obj);
params.hex = o.getEncodedHex();
}
KJUR.asn1.DEROctetString.superclass.constructor.call(this, params);
this.hT = "04";
};
Expand Down Expand Up @@ -1163,8 +1220,8 @@ KJUR.asn1.DEREnumerated = function(params) {
* two's complement representation.
* @example
* new KJUR.asn1.DEREnumerated(123);
* new KJUR.asn1.DEREnumerated({'int': 123});
* new KJUR.asn1.DEREnumerated({'hex': '1fad'});
* new KJUR.asn1.DEREnumerated({int: 123});
* new KJUR.asn1.DEREnumerated({hex: '1fad'});
*/
this.setValueHex = function(newHexString) {
this.hV = newHexString;
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kjur-jsrsasign",
"version": "6.1.0",
"version": "6.1.1",
"main": "jsrsasign-latest-all-min.js",
"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.",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions jsrsasign-latest-all-min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 6ad03d2

Please sign in to comment.