File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ Reader.prototype.readEnumeration = function() {
146
146
} ;
147
147
148
148
149
- Reader . prototype . readString = function ( tag ) {
149
+ Reader . prototype . readString = function ( tag , retbuf ) {
150
150
if ( ! tag )
151
151
tag = ASN1 . OctetString ;
152
152
@@ -171,11 +171,10 @@ Reader.prototype.readString = function(tag) {
171
171
if ( this . length === 0 )
172
172
return '' ;
173
173
174
- var str =
175
- this . _buf . slice ( this . _offset , this . _offset + this . length ) . toString ( 'utf8' ) ;
174
+ var str = this . _buf . slice ( this . _offset , this . _offset + this . length ) ;
176
175
this . _offset += this . length ;
177
176
178
- return str ;
177
+ return retbuf ? str : str . toString ( 'utf8' ) ;
179
178
} ;
180
179
181
180
Original file line number Diff line number Diff line change 2
2
"author" : " Mark Cavage <mcavage@gmail.com>" ,
3
3
"name" : " asn1" ,
4
4
"description" : " Contains parsers and serializers for ASN.1 (currently BER only)" ,
5
- "version" : " 0.1.5 " ,
5
+ "version" : " 0.1.6 " ,
6
6
"repository" : {
7
7
"type" : " git" ,
8
8
"url" : " git://github.com/mcavage/node-asn1.git"
You can’t perform that action at this time.
0 commit comments