From 29a7a232afac43b7fd8ed017555269389a5f54cb Mon Sep 17 00:00:00 2001 From: Kenji Urushima Date: Tue, 4 Aug 2020 15:48:54 +0900 Subject: [PATCH] update --- ChangeLog.txt | 4 ++++ README.md | 2 +- src/asn1hex-1.1.js | 14 ++++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index c3dc1bf9..1f731284 100755 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,10 @@ ChangeLog for jsrsasign +* Changes from 8.0.21 to next version + - src/asn1hex.js + - dump method update for BitString encapsulated + Donation program started, more RSA-PSS support and add ASN1HEX.get{Idx,TLV,V}byListEx * Changes from 8.0.20 to 8.0.21 (2020-Aug-01) - *donation program* have been started. diff --git a/README.md b/README.md index 2ec33549..965e4c69 100755 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Your bugfix and pull request contribution are always welcomed :) NEWS ---- -- 2020-Aug-02: twitter account [@kjur](https://twitter.com/jsrsasign) started. please follow. +- 2020-Aug-02: twitter account [@jsrsasign](https://twitter.com/jsrsasign) started. please follow. HIGHLIGHTS ---------- diff --git a/src/asn1hex-1.1.js b/src/asn1hex-1.1.js index 229676a8..00d2933c 100644 --- a/src/asn1hex-1.1.js +++ b/src/asn1hex-1.1.js @@ -1,4 +1,4 @@ -/* asn1hex-1.2.1.js (c) 2012-2020 Kenji Urushima | kjur.github.com/jsrsasign/license +/* asn1hex-1.2.2.js (c) 2012-2020 Kenji Urushima | kjur.github.com/jsrsasign/license */ /* * asn1hex.js - Hexadecimal represented ASN.1 string library @@ -16,7 +16,7 @@ * @fileOverview * @name asn1hex-1.1.js * @author Kenji Urushima kenji.urushima@gmail.com - * @version jsrsasign 8.0.19 asn1hex 1.2.1 (2020-Jun-22) + * @version jsrsasign 8.0.19 asn1hex 1.2.2 (2020-Aug-06) * @license MIT License */ @@ -725,11 +725,17 @@ ASN1HEX.dump = function(hexOrObj, flags, idx, indent) { } if (hex.substr(idx, 2) == "02") { var v = _getV(hex, idx); - return indent + "INTEGER " + _skipLongHex(v, skipLongHex) + "\n"; + return indent + "INTEGER " + _skipLongHex(v, skipLongHex) + "\n"; } if (hex.substr(idx, 2) == "03") { var v = _getV(hex, idx); - return indent + "BITSTRING " + _skipLongHex(v, skipLongHex) + "\n"; + if (_ASN1HEX.isASN1HEX(v.substr(2))) { + var s = indent + "BITSTRING, encapsulates\n"; + s = s + _dump(v.substr(2), flags, 0, indent + " "); + return s; + } else { + return indent + "BITSTRING " + _skipLongHex(v, skipLongHex) + "\n"; + } } if (hex.substr(idx, 2) == "04") { var v = _getV(hex, idx);